Skip to content

Commit 5420d30

Browse files
kjnilssonmergify[bot]
authored andcommitted
Fix flake(s) in rabbit_fifo_int_SUITE
The start_cluster helper used the same UID (!!) for all members in the local cluster. This resulted in shared mem tables and all sorts of havoc. (cherry picked from commit 1d9f179) (cherry picked from commit 7899349) # Conflicts: # deps/rabbit/test/rabbit_fifo_int_SUITE.erl
1 parent 5fad4b7 commit 5420d30

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

deps/rabbit/test/rabbit_fifo_int_SUITE.erl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,10 +938,26 @@ discard_next_delivery(ClusterName, State0, Wait) ->
938938
end.
939939

940940
start_cluster(ClusterName, ServerIds, RaFifoConfig) ->
941+
<<<<<<< HEAD
941942
{ok, Started, _} = ra:start_cluster(?RA_SYSTEM,
942943
ClusterName#resource.name,
943944
{module, rabbit_fifo, RaFifoConfig},
944945
ServerIds),
946+
=======
947+
NameBin = ra_lib:to_binary(ClusterName#resource.name),
948+
Confs = [begin
949+
UId = ra:new_uid(NameBin),
950+
#{id => Id,
951+
uid => UId,
952+
cluster_name => ClusterName#resource.name,
953+
log_init_args => #{uid => UId},
954+
initial_members => ServerIds,
955+
initial_machine_version => rabbit_fifo:version(),
956+
machine => {module, rabbit_fifo, RaFifoConfig}}
957+
end
958+
|| Id <- ServerIds],
959+
{ok, Started, _} = ra:start_cluster(?RA_SYSTEM, Confs),
960+
>>>>>>> 789934958 (Fix flake(s) in rabbit_fifo_int_SUITE)
945961
?assertEqual(length(Started), length(ServerIds)),
946962
ok.
947963

0 commit comments

Comments
 (0)