@@ -1074,14 +1074,14 @@ mod tests {
10741074 }
10751075
10761076 #[ derive( Debug , Clone ) ]
1077- struct AsyncLogExporter {
1077+ struct LogExporterThatRequiresTokioSpawn {
10781078 logs : Arc < Mutex < Vec < ( LogRecord , InstrumentationLibrary ) > > > ,
10791079 }
10801080
1081- impl AsyncLogExporter {
1082- /// Creates a new instance of `AsyncLogExporter `.
1081+ impl LogExporterThatRequiresTokioSpawn {
1082+ /// Creates a new instance of `LogExporterThatRequiresTokioSpawn `.
10831083 pub ( crate ) fn new ( ) -> Self {
1084- AsyncLogExporter {
1084+ LogExporterThatRequiresTokioSpawn {
10851085 logs : Arc :: new ( Mutex :: new ( Vec :: new ( ) ) ) ,
10861086 }
10871087 }
@@ -1096,7 +1096,7 @@ mod tests {
10961096 use tokio:: time:: sleep;
10971097
10981098 #[ async_trait:: async_trait]
1099- impl LogExporter for AsyncLogExporter {
1099+ impl LogExporter for LogExporterThatRequiresTokioSpawn {
11001100 async fn export ( & mut self , batch : LogBatch < ' _ > ) -> LogResult < ( ) > {
11011101 println ! ( "Exporting..." ) ;
11021102
@@ -1118,7 +1118,7 @@ mod tests {
11181118 fn test_simple_processor_async_exporter_without_runtime ( ) {
11191119 // Use `catch_unwind` to catch the panic caused by missing Tokio runtime
11201120 let result = std:: panic:: catch_unwind ( || {
1121- let exporter = AsyncLogExporter :: new ( ) ;
1121+ let exporter = LogExporterThatRequiresTokioSpawn :: new ( ) ;
11221122 let processor = SimpleLogProcessor :: new ( Box :: new ( exporter. clone ( ) ) ) ;
11231123
11241124 let mut record: LogRecord = Default :: default ( ) ;
@@ -1153,7 +1153,7 @@ mod tests {
11531153
11541154 #[ tokio:: test( flavor = "multi_thread" , worker_threads = 1 ) ]
11551155 async fn test_simple_processor_async_exporter_with_runtime ( ) {
1156- let exporter = AsyncLogExporter :: new ( ) ;
1156+ let exporter = LogExporterThatRequiresTokioSpawn :: new ( ) ;
11571157 let processor = SimpleLogProcessor :: new ( Box :: new ( exporter. clone ( ) ) ) ;
11581158
11591159 let mut record: LogRecord = Default :: default ( ) ;
@@ -1166,7 +1166,7 @@ mod tests {
11661166
11671167 #[ tokio:: test( flavor = "multi_thread" ) ]
11681168 async fn test_simple_processor_async_exporter_with_multi_thread_runtime ( ) {
1169- let exporter = AsyncLogExporter :: new ( ) ;
1169+ let exporter = LogExporterThatRequiresTokioSpawn :: new ( ) ;
11701170 let processor = Arc :: new ( Mutex :: new ( SimpleLogProcessor :: new ( Box :: new (
11711171 exporter. clone ( ) ,
11721172 ) ) ) ) ;
@@ -1195,7 +1195,7 @@ mod tests {
11951195 #[ tokio:: test( flavor = "current_thread" ) ]
11961196 #[ ignore] // This test hangs as of now.
11971197 async fn test_simple_processor_async_exporter_with_current_thread_runtime ( ) {
1198- let exporter = AsyncLogExporter :: new ( ) ;
1198+ let exporter = LogExporterThatRequiresTokioSpawn :: new ( ) ;
11991199
12001200 let processor = SimpleLogProcessor :: new ( Box :: new ( exporter. clone ( ) ) ) ;
12011201
0 commit comments