@@ -978,36 +978,30 @@ from_mnesia_to_khepri(Config) ->
978
978
979
979
case rabbit_ct_broker_helpers :enable_feature_flag (Config , khepri_db ) of
980
980
ok ->
981
- case rabbit_ct_broker_helpers :enable_feature_flag (Config , rabbit_consistent_hash_exchange_raft_based_metadata_store ) of
982
- ok ->
983
- [amqp_channel :call (Chan ,
984
- # 'basic.publish' {exchange = CHX , routing_key = rnd ()},
985
- # amqp_msg {props = # 'P_basic' {}, payload = <<>>})
986
- || _ <- lists :duplicate (IterationCount , const )],
987
- amqp_channel :wait_for_confirms (Chan , 300 ),
988
- timer :sleep (500 ),
989
- Counts =
990
- [begin
991
- # 'queue.declare_ok' {message_count = M } =
992
- amqp_channel :call (Chan , # 'queue.declare' {queue = Q ,
993
- exclusive = true }),
994
- M
995
- end || Q <- Queues ],
996
- ? assertEqual (IterationCount , lists :sum (Counts )), % % All messages got routed
997
- % % Chi-square test
998
- % % H0: routing keys are not evenly distributed according to weight
999
- Expected = [IterationCount div 6 , IterationCount div 6 , (IterationCount div 6 ) * 2 , (IterationCount div 6 ) * 2 ],
1000
- Obs = lists :zip (Counts , Expected ),
1001
- Chi = lists :sum ([((O - E ) * (O - E )) / E || {O , E } <- Obs ]),
1002
- ct :pal (" Chi-square test for 3 degrees of freedom is ~p , p = 0.01 is 11.35, observations (counts, expected): ~p " ,
1003
- [Chi , Obs ]),
1004
- clean_up_test_topology (Config , CHX , Queues ),
1005
- rabbit_ct_client_helpers :close_connection_and_channel (Conn , Chan ),
1006
- ok ;
1007
- Skip ->
1008
- rabbit_ct_client_helpers :close_connection_and_channel (Conn , Chan ),
1009
- Skip
1010
- end ;
981
+ [amqp_channel :call (Chan ,
982
+ # 'basic.publish' {exchange = CHX , routing_key = rnd ()},
983
+ # amqp_msg {props = # 'P_basic' {}, payload = <<>>})
984
+ || _ <- lists :duplicate (IterationCount , const )],
985
+ amqp_channel :wait_for_confirms (Chan , 300 ),
986
+ timer :sleep (500 ),
987
+ Counts =
988
+ [begin
989
+ # 'queue.declare_ok' {message_count = M } =
990
+ amqp_channel :call (Chan , # 'queue.declare' {queue = Q ,
991
+ exclusive = true }),
992
+ M
993
+ end || Q <- Queues ],
994
+ ? assertEqual (IterationCount , lists :sum (Counts )), % % All messages got routed
995
+ % % Chi-square test
996
+ % % H0: routing keys are not evenly distributed according to weight
997
+ Expected = [IterationCount div 6 , IterationCount div 6 , (IterationCount div 6 ) * 2 , (IterationCount div 6 ) * 2 ],
998
+ Obs = lists :zip (Counts , Expected ),
999
+ Chi = lists :sum ([((O - E ) * (O - E )) / E || {O , E } <- Obs ]),
1000
+ ct :pal (" Chi-square test for 3 degrees of freedom is ~p , p = 0.01 is 11.35, observations (counts, expected): ~p " ,
1001
+ [Chi , Obs ]),
1002
+ clean_up_test_topology (Config , CHX , Queues ),
1003
+ rabbit_ct_client_helpers :close_connection_and_channel (Conn , Chan ),
1004
+ ok ;
1011
1005
Skip ->
1012
1006
rabbit_ct_client_helpers :close_connection_and_channel (Conn , Chan ),
1013
1007
Skip
0 commit comments