diff options
author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2020-09-21 17:35:24 +0200 |
---|---|---|
committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2020-09-21 17:37:48 +0200 |
commit | f95bb4a4b1468a05c69202a2e0e03d063bc248de (patch) | |
tree | 26a9190e43ceb02a4f56e1946a15a010bc642251 | |
parent | 3038f6e6eb3a3393420bad857582f0208caffa78 (diff) | |
download | rabbitmq-server-git-f95bb4a4b1468a05c69202a2e0e03d063bc248de.tar.gz |
per_user_connection_channel_limit_SUITE: Wait for channel/connection to terminate
... `most_basic_cluster_connection_and_channel_count` testcases.
`amqp_channel:close()` is a synchronous call in the AMQP client. However
we verify the number of remaining channels/connections on the server
side. This explains the fact that there might be a window of time where
the server-side resources might not be completely cleaned up when the
client-side calls return.
-rw-r--r-- | test/per_user_connection_channel_limit_SUITE.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/per_user_connection_channel_limit_SUITE.erl b/test/per_user_connection_channel_limit_SUITE.erl index 8486ef181d..5ad2ba805b 100644 --- a/test/per_user_connection_channel_limit_SUITE.erl +++ b/test/per_user_connection_channel_limit_SUITE.erl @@ -442,10 +442,10 @@ most_basic_cluster_connection_and_channel_count(Config) -> ?assertEqual(15, count_channels_of_user(Config, Username)), close_channels(Chans1 ++ Chans2 ++ Chans3), - ?assertEqual(0, count_channels_of_user(Config, Username)), + ?awaitMatch(0, count_channels_of_user(Config, Username), 60000), close_connections([Conn1, Conn2, Conn3]), - ?assertEqual(0, count_connections_of_user(Config, Username)). + ?awaitMatch(0, count_connections_of_user(Config, Username), 60000). cluster_single_user_connection_and_channel_count(Config) -> Username = proplists:get_value(rmq_username, Config), @@ -1515,9 +1515,9 @@ count_connections_of_user(Config, Username) -> count_connections_in(Config, Username, NodeIndex) -> count_user_tracked_items(Config, NodeIndex, rabbit_connection_tracking, Username). - count_channels_of_user(Config, Username) -> - count_channels_in(Config, Username, 0). - count_channels_in(Config, Username, NodeIndex) -> +count_channels_of_user(Config, Username) -> + count_channels_in(Config, Username, 0). +count_channels_in(Config, Username, NodeIndex) -> count_user_tracked_items(Config, NodeIndex, rabbit_channel_tracking, Username). count_user_tracked_items(Config, NodeIndex, TrackingMod, Username) -> |