@@ -609,60 +609,63 @@ fn check_for_all_consistencies_and_setting_options(
609
609
#[ ntest:: timeout( 60000 ) ]
610
610
async fn consistency_is_correctly_set_in_cql_requests ( ) {
611
611
setup_tracing ( ) ;
612
- let res = test_with_3_node_dry_mode_cluster ( |proxy_uris, mut running_proxy| {
613
- let request_rules = |tx| {
614
- handshake_rules ( )
615
- . into_iter ( )
616
- . chain ( drop_metadata_queries_rules ( ) )
617
- . chain ( [
618
- RequestRule (
619
- Condition :: and (
620
- Condition :: not ( Condition :: ConnectionRegisteredAnyEvent ) ,
621
- Condition :: RequestOpcode ( RequestOpcode :: Prepare ) ,
612
+ let res = test_with_3_node_dry_mode_cluster (
613
+ || None ,
614
+ |proxy_uris, mut running_proxy| {
615
+ let request_rules = |tx| {
616
+ handshake_rules ( )
617
+ . into_iter ( )
618
+ . chain ( drop_metadata_queries_rules ( ) )
619
+ . chain ( [
620
+ RequestRule (
621
+ Condition :: and (
622
+ Condition :: not ( Condition :: ConnectionRegisteredAnyEvent ) ,
623
+ Condition :: RequestOpcode ( RequestOpcode :: Prepare ) ,
624
+ ) ,
625
+ // Respond to a PREPARE request with a prepared statement ID.
626
+ // This assumes 0 bind variables and 0 returned columns.
627
+ RequestReaction :: forge_response ( Arc :: new ( forge_prepare_response) ) ,
622
628
) ,
623
- // Respond to a PREPARE request with a prepared statement ID.
624
- // This assumes 0 bind variables and 0 returned columns.
625
- RequestReaction :: forge_response ( Arc :: new ( forge_prepare_response) ) ,
626
- ) ,
627
- RequestRule (
628
- Condition :: and (
629
- Condition :: not ( Condition :: ConnectionRegisteredAnyEvent ) ,
630
- Condition :: or (
631
- Condition :: RequestOpcode ( RequestOpcode :: Execute ) ,
629
+ RequestRule (
630
+ Condition :: and (
631
+ Condition :: not ( Condition :: ConnectionRegisteredAnyEvent ) ,
632
632
Condition :: or (
633
- Condition :: RequestOpcode ( RequestOpcode :: Batch ) ,
634
- Condition :: and (
635
- Condition :: RequestOpcode ( RequestOpcode :: Query ) ,
636
- Condition :: BodyContainsCaseSensitive ( Box :: new (
637
- * b"INTO consistency_tests" ,
638
- ) ) ,
633
+ Condition :: RequestOpcode ( RequestOpcode :: Execute ) ,
634
+ Condition :: or (
635
+ Condition :: RequestOpcode ( RequestOpcode :: Batch ) ,
636
+ Condition :: and (
637
+ Condition :: RequestOpcode ( RequestOpcode :: Query ) ,
638
+ Condition :: BodyContainsCaseSensitive ( Box :: new (
639
+ * b"INTO consistency_tests" ,
640
+ ) ) ,
641
+ ) ,
639
642
) ,
640
643
) ,
641
644
) ,
645
+ RequestReaction :: forge ( )
646
+ . server_error ( )
647
+ . with_feedback_when_performed ( tx) ,
642
648
) ,
643
- RequestReaction :: forge ( )
644
- . server_error ( )
645
- . with_feedback_when_performed ( tx) ,
646
- ) ,
647
- ] )
648
- . collect :: < Vec < _ > > ( )
649
- } ;
650
-
651
- // Set the rules for the requests.
652
- // This has the following effect:
653
- // 1. PREPARE requests will be answered with a forged response.
654
- // 2. EXECUTE, BATCH and QUERY requests will be replied with a forged error response,
655
- // but additionally will send a feedback to the channel `tx`, which will be used
656
- // to verify the consistency and serial consistency set in the request.
657
- let ( request_tx, request_rx) = mpsc:: unbounded_channel ( ) ;
658
- for running_node in running_proxy. running_nodes . iter_mut ( ) {
659
- running_node. change_request_rules ( Some ( request_rules ( request_tx. clone ( ) ) ) ) ;
660
- }
649
+ ] )
650
+ . collect :: < Vec < _ > > ( )
651
+ } ;
652
+
653
+ // Set the rules for the requests.
654
+ // This has the following effect:
655
+ // 1. PREPARE requests will be answered with a forged response.
656
+ // 2. EXECUTE, BATCH and QUERY requests will be replied with a forged error response,
657
+ // but additionally will send a feedback to the channel `tx`, which will be used
658
+ // to verify the consistency and serial consistency set in the request.
659
+ let ( request_tx, request_rx) = mpsc:: unbounded_channel ( ) ;
660
+ for running_node in running_proxy. running_nodes . iter_mut ( ) {
661
+ running_node. change_request_rules ( Some ( request_rules ( request_tx. clone ( ) ) ) ) ;
662
+ }
661
663
662
- check_for_all_consistencies_and_setting_options ( request_rx, proxy_uris) ;
664
+ check_for_all_consistencies_and_setting_options ( request_rx, proxy_uris) ;
663
665
664
- running_proxy
665
- } )
666
+ running_proxy
667
+ } ,
668
+ )
666
669
. await ;
667
670
668
671
match res {
0 commit comments