Skip to content

Commit 03cf2bd

Browse files
committed
Update AIPCorruptionRiskAssessmentTest.java
1 parent 6d74059 commit 03cf2bd

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

roda-core/roda-core-tests/src/main/java/org/roda/core/plugins/AIPCorruptionRiskAssessmentTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,11 @@ public void testAIPCorruption() throws RODAException {
106106
SelectedItemsList.create(AIP.class, Collections.singletonList(aipId)));
107107

108108
List<Report> jobReports = TestsHelper.getJobReports(index, job, false);
109-
int count = StringUtils.countMatches(jobReports.get(0).getPluginDetails(), "<div class=\"entry level_error\">");
109+
110110
index.commit(RiskIncidence.class);
111111
long incidences = index.count(RiskIncidence.class, Filter.ALL);
112112

113-
// 3 errors: 1 checksum checking error, 1 file without premis, 1 premis
114-
// without file Assert.assertEquals(count, 3);
115-
Assert.assertEquals(incidences, 2);
113+
Assert.assertEquals(incidences, 3, "3 incidences should be reported for the corrupted AIP: 1 checksum error, 1 file without PREMIS, 1 PREMIS without file");
116114
Assert.assertEquals(jobReports.getFirst().getPluginState(), PluginState.FAILURE);
117115
}
118116

0 commit comments

Comments
 (0)