Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove (useless) flaky test #192

Merged
merged 1 commit into from
May 28, 2024
Merged

Remove (useless) flaky test #192

merged 1 commit into from
May 28, 2024

Conversation

mbusi
Copy link
Contributor

@mbusi mbusi commented May 21, 2024

The test was flaky because it was relying on a weird race condition moslty related to the order the processes shutdown when closing a channel; sometimes it failed with

  1) test basic consume cancel exits the process when channel is closed (BasicTest)
     test/basic_test.exs:95
     match (=) failed
     code:  assert {:normal, _} = catch_exit(Basic.cancel(meta[:chan], consumer_tag))
     left:  {:normal, _}
     right: {
              :noproc,
              {:gen_server, :call, [#PID<0.372.0>, {:call, {:"basic.cancel", "amq.ctag-7S2NmqLj18nRwk_-O_tQ1A", false}, :none, #PID<0.360.0>}, 70000]}
            }
     stacktrace:
       test/basic_test.exs:103: (test)

This can be easily reproduced by simply adding a

:timer.sleep(100)

after closing the channel

I'd argue that this test was useless anyway (I still don't understand what the test purpose was) so I simply removed it 🤷

@mbusi mbusi requested a review from PaoloLaurenti May 21, 2024 13:57
@mbusi mbusi marked this pull request as ready for review May 21, 2024 13:57
@mbusi mbusi requested a review from a team as a code owner May 21, 2024 13:57
@mbusi mbusi merged commit 719581c into master May 28, 2024
3 checks passed
@mbusi mbusi deleted the useless_test branch May 28, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants