Skip to content

Commit b023062

Browse files
CLI distribution_test.exs: skip it on CI
it flakes specifically on CI. We can afford to skip this specific test there and only run it locally.
1 parent 69bd5ef commit b023062

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

deps/rabbitmq_cli/test/core/distribution_test.exs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ defmodule DistributionTest do
2727
:exit, _ -> :ok
2828
end
2929

30-
System.put_env("RABBITMQ_ERLANG_COOKIE", "mycookie")
31-
opts = %{}
32-
Distribution.start(opts)
33-
:mycookie = Node.get_cookie()
30+
if !System.get_env("CI") do
31+
System.put_env("RABBITMQ_ERLANG_COOKIE", "mycookie")
32+
opts = %{}
33+
Distribution.start(opts)
34+
:mycookie = Node.get_cookie()
35+
end
3436
end
3537

3638
test "set cookie via argument" do
@@ -45,8 +47,10 @@ defmodule DistributionTest do
4547
:exit, _ -> :ok
4648
end
4749

48-
opts = %{erlang_cookie: :mycookie}
49-
Distribution.start(opts)
50-
:mycookie = Node.get_cookie()
50+
if !System.get_env("CI") do
51+
opts = %{erlang_cookie: :mycookie}
52+
Distribution.start(opts)
53+
:mycookie = Node.get_cookie()
54+
end
5155
end
5256
end

0 commit comments

Comments
 (0)