@@ -908,24 +908,26 @@ async fn test_otel() {
908
908
let mut config = default_test_config ( ) ;
909
909
config. metrics_enabled = true ;
910
910
config. log_fmt = "otlp" . to_string ( ) ;
911
- config. log_level = "trace " . to_string ( ) ;
911
+ config. log_level = "debug " . to_string ( ) ;
912
912
913
913
setup_metrics ( ) . unwrap ( ) ;
914
914
setup_tracing ( & config. log_level , & config. log_fmt , config. log_no_color ) . unwrap ( ) ;
915
915
916
916
let app = app ( config) . await ;
917
917
918
- // one succesful request
919
- let request = Request :: builder ( )
920
- . method ( http:: Method :: POST )
921
- . header ( header:: CONTENT_TYPE , "application/json" )
922
- . uri ( "/validate/pod-privileged" )
923
- . body ( Body :: from ( include_str ! (
924
- "data/pod_without_privileged_containers.json"
925
- ) ) )
926
- . unwrap ( ) ;
927
- let response = app. oneshot ( request) . await . unwrap ( ) ;
928
- assert_eq ! ( response. status( ) , 200 ) ;
918
+ // some succesful request
919
+ for _ in 0 ..5 {
920
+ let request = Request :: builder ( )
921
+ . method ( http:: Method :: POST )
922
+ . header ( header:: CONTENT_TYPE , "application/json" )
923
+ . uri ( "/validate/pod-privileged" )
924
+ . body ( Body :: from ( include_str ! (
925
+ "data/pod_without_privileged_containers.json"
926
+ ) ) )
927
+ . unwrap ( ) ;
928
+ let response = app. clone ( ) . oneshot ( request) . await . unwrap ( ) ;
929
+ assert_eq ! ( response. status( ) , 200 ) ;
930
+ }
929
931
930
932
let exponential_backoff = ExponentialBuilder :: default ( )
931
933
. with_min_delay ( Duration :: from_secs ( 10 ) )
0 commit comments