diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/DataSetAndPathInfoDBConsistencyCheckTaskTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/DataSetAndPathInfoDBConsistencyCheckTaskTest.java index e2b08661b57878c0070db3194ef86ef2ff520320..1e0839567f4a7870b01fb9e734f7d9c89b2f40e7 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/DataSetAndPathInfoDBConsistencyCheckTaskTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/path/DataSetAndPathInfoDBConsistencyCheckTaskTest.java @@ -119,20 +119,19 @@ public class DataSetAndPathInfoDBConsistencyCheckTaskTest extends AssertJUnit task.execute(); - assertEquals("INFO OPERATION.DataSetAndPathInfoDBConsistencyCheckTask - " - + "Check 1 data sets registered since 1970-01-01 01:00:00\n" - + "ERROR OPERATION.DataSetAndPathInfoDBConsistencyChecker - " + assertThat(logRecorder.getLogLines(), hasItem("INFO OPERATION.DataSetAndPathInfoDBConsistencyCheckTask - " + + "Check 1 data sets registered since 1970-01-01 01:00:00")); + assertThat(logRecorder.getLogLines(), hasItem("ERROR OPERATION.DataSetAndPathInfoDBConsistencyChecker - " + "Couldn't check consistency of the file system and " - + "the path info database for a data set: ds1\n" - + "java.lang.RuntimeException: Oohps!\n" - + "ERROR NOTIFY.DataSetAndPathInfoDBConsistencyCheckTask - " + + "the path info database for a data set: ds1")); + assertThat(logRecorder.getLogLines(), hasItem("java.lang.RuntimeException: Oohps!")); + assertThat(logRecorder.getLogLines(), hasItem("ERROR NOTIFY.DataSetAndPathInfoDBConsistencyCheckTask - " + "File system and path info DB consistency check report " - + "for all data sets since 1970-01-01 01:00:00\n\n" - + "Error when checking datasets:\n\n" - + "ERROR: \"Couldn't check consistency of the file system and " - + "the path info database for a data set: ds1 " - + "because of the following exception: Oohps!\"", - LogUtils.removeEmbeddedStackTrace(logRecorder.getLogContent())); + + "for all data sets since 1970-01-01 01:00:00")); + assertThat(logRecorder.getLogLines(), hasItem("Error when checking datasets:")); + assertThat(logRecorder.getLogLines(), hasItem("ERROR: \"Couldn't check consistency of the file system and " + + "the path info database for a data set: ds1 because of the following exception: Oohps!\"")); + assertEquals(true, fileContent.isClosed()); context.assertIsSatisfied(); }