Skip to content

Commit

Permalink
Small tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Mario committed Apr 27, 2024
1 parent 96a5af0 commit 32254de
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion gatewayservice/gateway-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const transporter = nodemailer.createTransport({
});

const authServiceUrl = process.env.AUTH_SERVICE_URL || 'http://localhost:8002';
const userServiceUrl = process.env.USER_SERVICE_URL || 'http://localhost:8011';
const userServiceUrl = process.env.USER_SERVICE_URL || 'http://localhost:8001';
const questionServiceUrl = process.env.QUESTION_SERVICE_URL || 'http://localhost:8003';
const recordServiceUrl = process.env.RECORD_SERVICE_URL || 'http://localhost:8004';

Expand Down
2 changes: 1 addition & 1 deletion questionGenerator/src/main/java/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class Main {
QuestionType.SIZE, QuestionType.HEAD_OF_GOVERMENT};
//, QuestionType.VIDEOGAME_DEVELOPER, QuestionType.VIDEOGAME_PUBLISHER, QuestionType.VIDEOGAME_GENRE, QuestionType.VIDEOGAME_COUNTRY};

private static final int NUMBER_OF_QUESTIONS = 50;
private static final int NUMBER_OF_QUESTIONS = 20;
//private static final int NUMBER_OF_QUESTIONS = 75;
//private static final int NUMBER_OF_QUESTIONS = 3;
//private static final int NUMBER_OF_QUESTIONS = 1;
Expand Down
1 change: 0 additions & 1 deletion questionGenerator/src/main/java/MainStatic.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ private static void run(QuestionGenerator qg, QuestionType type, int numberOfQue
List<Question> questions = qg.generateQuestions(type, numberOfQuestions);
for(int i=0; i<questions.size(); i++) {
Question question = questions.get(i);
question.setNumber(i);
System.out.println(question.getJSON().toString());
}
System.out.println();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public List<Question> generateQuestions(QuestionType type, int amount){
try {
q = generator.generate(entity);
questions.add(q);
System.out.println(questions.size());
} catch(RuntimeException e) {
/*
* Sometimes not all the parameters for generating can be passed in the query, so this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private String getAnswer(String id) throws Exception{
public List<String> getWrongAnswers(String rightAnswer) throws Exception {
List<String> entites = new ArrayList<>();
try {
entites = EntityGenerator.getEntities(type, getSampleSize(), getPropertyId());
entites = EntityGenerator.getEntities(type, 20, getPropertyId());
} catch (IOException e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public class Question {

private String question;
private List<String> answers;
private int number = -1;
private String language;
private QuestionType type;

Expand Down Expand Up @@ -43,17 +42,12 @@ public void setAnswers(List<String> answers) {
public void addRightAnswer(String answer) {
answers.add(0, answer);
}

public void setNumber(int number){
this.number = number;
}

public JSONObject getJSON() {
JSONObject json = new JSONObject();
json.accumulate("question", question);
for(String s : answers)
json.accumulate("answers", s);
if(number != -1) json.accumulate("number", number); //Para que los tests pasen
json.accumulate("language", language);
json.accumulate("type", type);
return json;
Expand Down
2 changes: 1 addition & 1 deletion webapp/e2e/steps/competitiveGame.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = await puppeteer.launch({
headless: "new",
headless: false,
slowMo: 40,
defaultViewport: { width: 1920, height: 1080 },
args: ['--window-size=1920,1080']
Expand Down

0 comments on commit 32254de

Please sign in to comment.