fixed tests

This commit is contained in:
anhefti 2023-04-20 14:27:17 +02:00
parent d80bb27163
commit d3e3aca900

View file

@ -167,11 +167,11 @@ public class MockCourseAccessAPI implements CourseAccessAPI {
throw new IllegalArgumentException("Wrong clientId or secret");
}
//if (this.simulateLatency) {
final int seconds = this.random.nextInt(20);
System.out.println("************ Mockup LMS wait for " + seconds + " seconds before respond");
Thread.sleep(seconds * 1000);
//}
if (this.simulateLatency) {
final int seconds = this.random.nextInt(20);
System.out.println("************ Mockup LMS wait for " + seconds + " seconds before respond");
Thread.sleep(seconds * 1000);
}
return this.mockups
.stream()
@ -198,11 +198,11 @@ public class MockCourseAccessAPI implements CourseAccessAPI {
if (asyncQuizFetchBuffer.canceled) {
return;
}
//if (this.simulateLatency) {
final int seconds = this.random.nextInt(5);
System.out.println("************ Mockup LMS wait for " + seconds + " seconds before respond");
Utils.sleep(seconds * 1000);
//}
if (this.simulateLatency) {
final int seconds = this.random.nextInt(5);
System.out.println("************ Mockup LMS wait for " + seconds + " seconds before respond");
Utils.sleep(seconds * 1000);
}
asyncQuizFetchBuffer.buffer.add(quizData);
}