From 40ab3861db1975cb3655d126439b60d9bf55c954 Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 3 Nov 2021 11:29:05 +0100 Subject: [PATCH 1/2] better logging --- .../servicelayer/lms/impl/SEBRestrictionServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/SEBRestrictionServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/SEBRestrictionServiceImpl.java index dfc47920..d703945f 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/SEBRestrictionServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/SEBRestrictionServiceImpl.java @@ -202,7 +202,8 @@ public class SEBRestrictionServiceImpl implements SEBRestrictionService { .map(sebRestrictionData -> { if (log.isDebugEnabled()) { - log.debug("Applying SEB Client restriction on LMS with: {}", sebRestrictionData); + log.debug(" *** SEB Restriction *** Applying SEB Client restriction on LMS with: {}", + sebRestrictionData); } return this.lmsAPIService @@ -221,7 +222,7 @@ public class SEBRestrictionServiceImpl implements SEBRestrictionService { public Result releaseSEBClientRestriction(final Exam exam) { if (log.isDebugEnabled()) { - log.debug("Release SEB Client restrictions for exam: {}", exam); + log.debug(" *** SEB Restriction *** Release SEB Client restrictions from LMS for exam: {}", exam); } return this.lmsAPIService From 10d16d8af813ec129d8e42cba8c4cfe435640596 Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 3 Nov 2021 12:01:50 +0100 Subject: [PATCH 2/2] fixed tests --- .../integration/api/admin/ExamProctoringRoomServiceTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ExamProctoringRoomServiceTest.java b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ExamProctoringRoomServiceTest.java index b13bc549..9c1874c6 100644 --- a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ExamProctoringRoomServiceTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ExamProctoringRoomServiceTest.java @@ -51,7 +51,8 @@ public class ExamProctoringRoomServiceTest extends AdministrationAPIIntegrationT assertFalse(runningExamsForInstitution.hasError()); final Collection collection = runningExamsForInstitution.get(); assertFalse(collection.isEmpty()); - final Exam exam = collection.iterator().next(); + final Exam exam = collection.stream().filter(e -> e.id == 2L).findAny().orElse(null); + assertNotNull(exam); assertEquals("Demo Quiz 6 (MOCKUP)", exam.name); assertEquals("2", String.valueOf(exam.id)); }