From: Robert Varga Date: Fri, 25 Oct 2024 20:59:01 +0000 (+0200) Subject: Clarify ShardTest.testAbortWithCommitPending() X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=9a0f1d0641257c222aeb3020870d9a8e8185a192;p=controller.git Clarify ShardTest.testAbortWithCommitPending() Use an explicit equals() assertion, to make it clear what content we expect. Change-Id: I2b848c4ddec1f29e648abf8109e004848605fad9 Signed-off-by: Robert Varga --- diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java index 556b0bc31c..9d186d10fb 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java @@ -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