Clarify ShardTest.testAbortWithCommitPending() 08/114208/5
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 25 Oct 2024 20:59:01 +0000 (22:59 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 26 Oct 2024 09:13:59 +0000 (11:13 +0200)
Use an explicit equals() assertion, to make it clear what content we
expect.

Change-Id: I2b848c4ddec1f29e648abf8109e004848605fad9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java

index 556b0bc31c0c9ed67110b4e65e8e094fad485ba5..9d186d10fb934c1f58c03ada04e52b4e50979997 100644 (file)
@@ -1283,14 +1283,12 @@ public class ShardTest extends AbstractShardTest {
         shard.tell(new CommitTransaction(transactionID, CURRENT_VERSION).toSerializable(), testKit.getRef());
         testKit.expectMsgClass(duration, CommitTransactionReply.class);
 
-        final NormalizedNode node = readStore(shard, TestModel.TEST_PATH);
-
         // Since we're simulating an abort occurring during replication
         // and before finish commit,
         // the data should still get written to the in-memory store
         // since we've gotten past
         // canCommit and preCommit and persisted the data.
-        assertNotNull(TestModel.TEST_QNAME.getLocalName() + " not found", node);
+        assertEquals(TestModel.EMPTY_TEST, readStore(shard, TestModel.TEST_PATH));
     }
 
     @Test