Skip to content

Commit

Permalink
amqp_client_SUITE: Fix several test flakes
Browse files Browse the repository at this point in the history
[How]
1. Use feature flags correctly: the code shouldn't test if a feature
   flag is enabled, assuming something else enabled it. It should enable
   it and react to an error.
2. Use `close_connection_sync/1` instead of the asynchronous
   `amqp10_client:close_connection/1` to make sure they are really
   closed. The wait in `end_per_testcase/2` was not enough apparently.
3. For the two testcases that flake the most for me, enclose the code in
   a try/after and make sure to close the connection at the end,
   regardless of the result. This should be done for all testcases
   because the testgroup use a single set of RabbitMQ nodes for all
   testcases, therefore testcases are supposed to clean up after them...
  • Loading branch information
dumbbell committed Jan 24, 2025
1 parent 4627e7a commit aeca23c
Showing 1 changed file with 167 additions and 152 deletions.
Loading

0 comments on commit aeca23c

Please sign in to comment.