@@ -517,7 +517,7 @@ mod tests {
517517 } ;
518518 use sentry_arroyo:: types:: { BrokerMessage , InnerMessage , Partition , Topic } ;
519519 use sentry_options:: init_with_schemas;
520- use sentry_options:: testing:: set_override ;
520+ use sentry_options:: testing:: override_options ;
521521 use serde_json:: json;
522522 use std:: sync:: Once ;
523523 use std:: sync:: { Arc , Mutex } ;
@@ -825,31 +825,31 @@ mod tests {
825825 #[ test]
826826 fn test_should_not_use_blq_when_flag_disabled ( ) {
827827 init_config ( ) ;
828- let _guard = set_override ( "snuba" , "consumer.blq_enabled" , json ! ( false ) ) ;
828+ let _guard = override_options ( & [ ( "snuba" , "consumer.blq_enabled" , json ! ( false ) ) ] ) . unwrap ( ) ;
829829 let factory = make_factory ( Some ( blq_kafka_config ( ) ) , Some ( Topic :: new ( "blq" ) ) ) ;
830830 assert ! ( !factory. should_use_blq( ) ) ;
831831 }
832832
833833 #[ test]
834834 fn test_should_not_use_blq_when_no_producer_config ( ) {
835835 init_config ( ) ;
836- let _guard = set_override ( "snuba" , "consumer.blq_enabled" , json ! ( true ) ) ;
836+ let _guard = override_options ( & [ ( "snuba" , "consumer.blq_enabled" , json ! ( true ) ) ] ) . unwrap ( ) ;
837837 let factory = make_factory ( None , Some ( Topic :: new ( "blq" ) ) ) ;
838838 assert ! ( !factory. should_use_blq( ) ) ;
839839 }
840840
841841 #[ test]
842842 fn test_should_not_use_blq_when_no_topic ( ) {
843843 init_config ( ) ;
844- let _guard = set_override ( "snuba" , "consumer.blq_enabled" , json ! ( true ) ) ;
844+ let _guard = override_options ( & [ ( "snuba" , "consumer.blq_enabled" , json ! ( true ) ) ] ) . unwrap ( ) ;
845845 let factory = make_factory ( Some ( blq_kafka_config ( ) ) , None ) ;
846846 assert ! ( !factory. should_use_blq( ) ) ;
847847 }
848848
849849 #[ test]
850850 fn test_should_use_blq_when_all_conditions_met ( ) {
851851 init_config ( ) ;
852- let _guard = set_override ( "snuba" , "consumer.blq_enabled" , json ! ( true ) ) ;
852+ let _guard = override_options ( & [ ( "snuba" , "consumer.blq_enabled" , json ! ( true ) ) ] ) . unwrap ( ) ;
853853 let factory = make_factory ( Some ( blq_kafka_config ( ) ) , Some ( Topic :: new ( "blq" ) ) ) ;
854854 assert ! ( factory. should_use_blq( ) ) ;
855855 }
0 commit comments