@@ -89,42 +89,18 @@ mod logtests {
8989
9090 #[ tokio:: test( flavor = "multi_thread" , worker_threads = 4 ) ]
9191 #[ cfg( any( feature = "tonic-client" , feature = "reqwest-blocking-client" ) ) ]
92- #[ serial_test:: serial]
93- pub async fn test_logs ( ) -> Result < ( ) > {
94- // Make sure the container is running
95- use crate :: { assert_logs_results, init_logs} ;
96- test_utils:: start_collector_container ( ) . await ?;
97- test_utils:: cleanup_file ( "./actual/logs.json" ) ; // Ensure logs.json is empty before the test
98- let logger_provider = init_logs ( false ) . unwrap ( ) ;
99- let layer = layer:: OpenTelemetryTracingBridge :: new ( & logger_provider) ;
100- let subscriber = tracing_subscriber:: registry ( ) . with ( layer) ;
101- {
102- let _guard = tracing:: subscriber:: set_default ( subscriber) ;
103- info ! ( target: "my-target" , "hello from {}. My price is {}." , "banana" , 2.99 ) ;
104- }
105- let _ = logger_provider. shutdown ( ) ;
106- tokio:: time:: sleep ( Duration :: from_secs ( 5 ) ) . await ;
107- assert_logs_results ( test_utils:: LOGS_FILE , "expected/logs.json" ) ?;
108- Ok ( ( ) )
109- }
110-
111- #[ tokio:: test( flavor = "multi_thread" , worker_threads = 4 ) ]
112- #[ cfg( any( feature = "tonic-client" , feature = "reqwest-blocking-client" ) ) ]
113- #[ serial_test:: parallel]
11492 pub async fn logs_batch_tokio_multi_thread ( ) -> Result < ( ) > {
11593 logs_tokio_helper ( false ) . await
11694 }
11795
11896 #[ tokio:: test( flavor = "multi_thread" , worker_threads = 1 ) ]
11997 #[ cfg( any( feature = "tonic-client" , feature = "reqwest-blocking-client" ) ) ]
120- #[ serial_test:: parallel]
12198 pub async fn logs_batch_tokio_multi_with_one_worker ( ) -> Result < ( ) > {
12299 logs_tokio_helper ( false ) . await
123100 }
124101
125102 #[ tokio:: test( flavor = "current_thread" ) ]
126103 #[ cfg( any( feature = "tonic-client" , feature = "reqwest-blocking-client" ) ) ]
127- #[ serial_test:: parallel]
128104 pub async fn logs_batch_tokio_current ( ) -> Result < ( ) > {
129105 logs_tokio_helper ( false ) . await
130106 }
@@ -151,14 +127,12 @@ mod logtests {
151127
152128 #[ tokio:: test( flavor = "multi_thread" , worker_threads = 4 ) ]
153129 #[ cfg( any( feature = "tonic-client" , feature = "reqwest-client" ) ) ]
154- #[ serial_test:: parallel]
155130 pub async fn logs_simple_tokio_multi_thread ( ) -> Result < ( ) > {
156131 logs_tokio_helper ( true ) . await
157132 }
158133
159134 #[ tokio:: test( flavor = "multi_thread" , worker_threads = 1 ) ]
160135 #[ cfg( any( feature = "tonic-client" , feature = "reqwest-client" ) ) ]
161- #[ serial_test:: parallel]
162136 pub async fn logs_simple_tokio_multi_with_one_worker ( ) -> Result < ( ) > {
163137 logs_tokio_helper ( true ) . await
164138 }
@@ -167,14 +141,12 @@ mod logtests {
167141 #[ ignore]
168142 #[ tokio:: test( flavor = "current_thread" ) ]
169143 #[ cfg( any( feature = "tonic-client" , feature = "reqwest-client" ) ) ]
170- #[ serial_test:: parallel]
171144 pub async fn logs_simple_tokio_current ( ) -> Result < ( ) > {
172145 logs_tokio_helper ( true ) . await
173146 }
174147
175148 #[ test]
176149 #[ cfg( any( feature = "tonic-client" , feature = "reqwest-blocking-client" ) ) ]
177- #[ serial_test:: parallel]
178150 pub fn logs_batch_non_tokio_main ( ) -> Result < ( ) > {
179151 logs_non_tokio_helper ( false )
180152 }
@@ -207,7 +179,6 @@ mod logtests {
207179
208180 #[ test]
209181 #[ cfg( any( feature = "tonic-client" , feature = "reqwest-blocking-client" ) ) ]
210- #[ serial_test:: parallel]
211182 pub fn logs_simple_non_tokio_main ( ) -> Result < ( ) > {
212183 logs_non_tokio_helper ( true )
213184 }
0 commit comments