Skip to content

Commit

Permalink
[FIXED] flapping test: Test_KeyValueMirrorCrossDomains (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
levb authored Apr 19, 2024
1 parent 896d2d6 commit 4608e3b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -32391,6 +32391,15 @@ test_KeyValueMirrorCrossDomains(void)

test("Get key: ");
s = kvStore_Get(&e, mkv, "name");
// levb: we seem to get the old value at times here, so try one more time if
// there's a mismatch
for (i = 0; i < 3; i++)
if ((s == NATS_OK) && (e != NULL) && (strcmp(kvEntry_ValueString(e), "rip") != 0))
{
kvEntry_Destroy(e);
e = NULL;
s = kvStore_Get(&e, mkv, "name");
}
if ((s == NATS_OK) && (e != NULL))
s = (strcmp(kvEntry_ValueString(e), "rip") == 0 ? NATS_OK : NATS_ERR);
testCond(s == NATS_OK);
Expand Down

0 comments on commit 4608e3b

Please sign in to comment.