Skip to content

Commit

Permalink
per_user_connection_channel_tracking_SUITE: Remove dead code
Browse files Browse the repository at this point in the history
This code became unused when the `tracking_records_in_ets` feature flag
was made required and its compatibility code was removed.

Seee #7270.
  • Loading branch information
dumbbell committed Mar 1, 2023
1 parent 6aa5ec1 commit 0fad97f
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,6 @@ cluster_node_removed(Config) ->

rabbit_ct_broker_helpers:forget_cluster_node(Config, 0, 1),
timer:sleep(200),
NodeName = rabbit_ct_broker_helpers:get_node_config(Config, 1, nodename),

?assertEqual(false, is_process_alive(Conn2)),
[?assertEqual(false, is_process_alive(Ch)) || Ch <- Chans2],
Expand Down Expand Up @@ -720,30 +719,24 @@ exists_in_tracked_connection_per_vhost_table(Config, VHost) ->
exists_in_tracked_connection_per_vhost_table(Config, 0, VHost).
exists_in_tracked_connection_per_vhost_table(Config, NodeIndex, VHost) ->
exists_in_tracking_table(Config, NodeIndex,
fun rabbit_connection_tracking:tracked_connection_per_vhost_table_name_for/1,
tracked_connection_per_vhost,
VHost).

exists_in_tracked_connection_per_user_table(Config, Username) ->
exists_in_tracked_connection_per_user_table(Config, 0, Username).
exists_in_tracked_connection_per_user_table(Config, NodeIndex, Username) ->
exists_in_tracking_table(Config, NodeIndex,
fun rabbit_connection_tracking:tracked_connection_per_user_table_name_for/1,
tracked_connection_per_user,
Username).

exists_in_tracked_channel_per_user_table(Config, Username) ->
exists_in_tracked_channel_per_user_table(Config, 0, Username).
exists_in_tracked_channel_per_user_table(Config, NodeIndex, Username) ->
exists_in_tracking_table(Config, NodeIndex,
fun rabbit_channel_tracking:tracked_channel_per_user_table_name_for/1,
tracked_channel_per_user,
Username).

exists_in_tracking_table(Config, NodeIndex, TableNameFun, Table, Key) ->
Node = rabbit_ct_broker_helpers:get_node_config(
Config, NodeIndex, nodename),
Tab = TableNameFun(Node),
exists_in_tracking_table(Config, NodeIndex, Table, Key) ->
All = rabbit_ct_broker_helpers:rpc(Config, NodeIndex,
ets, lookup, [Table, Key]),
lists:keymember(Key, 1, All).
Expand Down

0 comments on commit 0fad97f

Please sign in to comment.