@@ -136,7 +136,7 @@ void initialOutage_recovers() throws InvalidTypeException, InterruptedException,
136136
137137 LOGGER .debug ("Wait and check that the state updates" );
138138 // With FLUSH this succeeds almost immediately.
139- // With WAIT it is artificially delayed.
139+ // With WAIT, it is artificially delayed.
140140 waitFor (driver );
141141 try (var _ = bosk .readContext ()) {
142142 assertEquals (initialState , bosk .rootReference ().value (),
@@ -253,6 +253,9 @@ void revisionDeleted_recovers() throws InterruptedException, IOException {
253253 Bosk <TestEntity > bosk = new Bosk <>(boskName (getClass ().getSimpleName ()), TestEntity .class , AbstractMongoDriverTest ::initialRoot , BoskConfig .<TestEntity >builder ().driverFactory (driverFactory ).build ());
254254
255255 try (var _ = bosk .readContext ()) {
256+ // This can fail on very short timescales; see testRecovery.
257+ // This isn't related to the revision deletion issues described above
258+ // and shouldn't really be grounds for removing this test.
256259 assertEquals (beforeState , bosk .rootReference ().value ());
257260 }
258261
@@ -320,6 +323,9 @@ private void testRecovery(Runnable disruptiveAction, Function<TestEntity, TestEn
320323 Bosk <TestEntity > bosk = new Bosk <>(boskName (getClass ().getSimpleName ()), TestEntity .class , AbstractMongoDriverTest ::initialRoot , BoskConfig .<TestEntity >builder ().driverFactory (driverFactory ).build ());
321324
322325 try (var _ = bosk .readContext ()) {
326+ // Note: with very short timescales, this assertion can fail because the newly created bosk
327+ // times out trying to read the database contents and instead uses AbstractMongoDriverTest::initialRoot.
328+ // This is actually valid behaviour for a sufficiently impatient user.
323329 assertEquals (beforeState , bosk .rootReference ().value ());
324330 }
325331
0 commit comments