Skip to content

Commit 4892c40

Browse files
committed
cluster_SUITE: Use a fence before a get
... when querying a store after messing with the cluster. [Why] It is possible that the query happens before the store caught up, leading to a previous value to be returned.
1 parent a3b8eab commit 4892c40

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/cluster_SUITE.erl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,10 @@ can_rejoin_after_a_reset_in_a_three_node_cluster(Config) ->
881881
call(Config, LeaderNode1, khepri, put, [StoreId, [foo], value2])),
882882
lists:foreach(
883883
fun(Node) ->
884+
ct:pal("- khepri:fence() from node ~s", [Node]),
885+
?assertEqual(
886+
ok,
887+
call(Config, Node, khepri, fence, [StoreId])),
884888
ct:pal("- khepri:get() from node ~s", [Node]),
885889
?assertEqual(
886890
{ok, value2},

0 commit comments

Comments
 (0)