Skip to content

Commit

Permalink
Fixes impractical comment line breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
N0W0RK committed Aug 5, 2024
1 parent d5b9d28 commit 448249c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public ScienceEvent createScienceEvent(String identity, ScienceEventType type, L

/**
* Comparator for comparing two science events.
* Allows for a 500ns difference between the timestamps due to the reimport from
* the csv export.
* Allows for a 500ns difference between the timestamps due to the reimport from the csv export.
*/
public static Comparator<ScienceEvent> scienceEventComparator = Comparator.comparing(ScienceEvent::getResourceId).thenComparing(ScienceEvent::getType)
.thenComparing((ScienceEvent e1, ScienceEvent e2) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,10 @@ private void assertCommunicationDataCsvFile(Path courseDirPath) {

/**
* Asserts the content of the science events CSV file.
* Allows for a 500ns difference between the timestamps due to the reimport from
* the csv export.
* Might cause the test to be flaky if multiple events are created overlapping
* and matched wrongly.
* Allows for a 500ns difference between the timestamps due to the reimport from the csv export.
*
* @param extractedZipDirPath The path to the extracted zip directory
* @param events The set of science events to compare with the
* content of the CSV file
* @param events The set of science events to compare with the content of the CSV file
*/
private void assertScienceEventsCSVFile(Path extractedZipDirPath, Set<ScienceEvent> events) {
assertThat(extractedZipDirPath).isDirectoryContaining(path -> "science_events.csv".equals(path.getFileName().toString()));
Expand Down Expand Up @@ -410,8 +406,7 @@ private void assertCorrectContentForExercise(Path exerciseDirPath, boolean cours
.isDirectoryContaining(path -> path.getFileName().toString().contains("plagiarism_case") && path.getFileName().toString().endsWith(FILE_FORMAT_CSV));
}
}
// only include automatic test feedback if the assessment due date is in the
// future
// only include automatic test feedback if the assessment due date is in the future
if (exerciseDirPath.toString().contains("Programming") && assessmentDueDateInTheFuture && courseExercise) {
var fileContentResult1 = Files.readString(getProgrammingResultsFilePath(exerciseDirPath, true));
// automatic feedback
Expand Down Expand Up @@ -644,7 +639,7 @@ void testDataExportContainsDataAboutCourseStudentUnenrolled() throws Exception {
var course = prepareCourseDataForDataExportCreation(assessmentDueDateInTheFuture, courseShortName);
conversationUtilService.addOneMessageForUserInCourse(TEST_PREFIX + "student1", course, "only one post");
var dataExport = initDataExport();
// by setting the course groups to a different value we simulate unenrollment
// by setting the course groups to a different value, we simulate unenrollment
// because the user is no longer part of the user group and hence, the course.
courseUtilService.updateCourseGroups("abc", course, "");
dataExportCreationService.createDataExport(dataExport);
Expand Down

0 comments on commit 448249c

Please sign in to comment.