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