Skip to content

Commit 4aa93e2

Browse files
committed
cluster_SUITE: Use a fence before a get
... when querying a store after messing with restarts and quorum. [Why] It is possible that the query happens before the store caught up, leading to a previous value to be returned.
1 parent 8eb4f27 commit 4aa93e2

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
@@ -1017,6 +1017,10 @@ can_restart_nodes_in_a_three_node_cluster(Config) ->
10171017
%% Running nodes should see the updated value however.
10181018
lists:foreach(
10191019
fun(Node) ->
1020+
ct:pal("- khepri:fence() from node ~s", [Node]),
1021+
?assertEqual(
1022+
ok,
1023+
call(Config, Node, khepri, fence, [StoreId])),
10201024
ct:pal("- khepri:get() from node ~s", [Node]),
10211025
?assertEqual(
10221026
{ok, value3},

0 commit comments

Comments
 (0)