@@ -645,15 +645,11 @@ mod tests {
645645 #[ derive( Debug ) ]
646646 struct CountingShutdownProcessor {
647647 shutdown_count : Arc < AtomicU32 > ,
648- flush_called : Arc < AtomicBool > ,
649648 }
650649
651650 impl CountingShutdownProcessor {
652- fn new ( shutdown_count : Arc < AtomicU32 > , flush_called : Arc < AtomicBool > ) -> Self {
653- CountingShutdownProcessor {
654- shutdown_count,
655- flush_called,
656- }
651+ fn new ( shutdown_count : Arc < AtomicU32 > ) -> Self {
652+ CountingShutdownProcessor { shutdown_count }
657653 }
658654 }
659655
@@ -667,7 +663,6 @@ mod tests {
667663 }
668664
669665 fn force_flush ( & self ) -> TraceResult < ( ) > {
670- self . flush_called . store ( true , Ordering :: SeqCst ) ;
671666 Ok ( ( ) )
672667 }
673668
@@ -687,7 +682,6 @@ mod tests {
687682 let shared_inner = Arc :: new ( TracerProviderInner {
688683 processors : vec ! [ Box :: new( CountingShutdownProcessor :: new(
689684 shutdown_count. clone( ) ,
690- flush_called. clone( ) ,
691685 ) ) ] ,
692686 config : Config :: default ( ) ,
693687 is_shutdown : AtomicBool :: new ( false ) ,
@@ -723,13 +717,11 @@ mod tests {
723717 #[ test]
724718 fn drop_after_shutdown_test_with_multiple_providers ( ) {
725719 let shutdown_count = Arc :: new ( AtomicU32 :: new ( 0 ) ) ;
726- let flush_called = Arc :: new ( AtomicBool :: new ( false ) ) ;
727720
728721 // Create a shared TracerProviderInner and use it across multiple providers
729722 let shared_inner = Arc :: new ( TracerProviderInner {
730723 processors : vec ! [ Box :: new( CountingShutdownProcessor :: new(
731724 shutdown_count. clone( ) ,
732- flush_called. clone( ) ,
733725 ) ) ] ,
734726 config : Config :: default ( ) ,
735727 is_shutdown : AtomicBool :: new ( false ) ,
@@ -754,6 +746,7 @@ mod tests {
754746 // TracerProvider2 should observe the shutdown state but not trigger another shutdown
755747 let shutdown_result2 = tracer_provider2. shutdown ( ) ;
756748 assert ! ( shutdown_result2. is_err( ) ) ;
749+ assert_eq ! ( shutdown_count. load( Ordering :: SeqCst ) , 1 ) ;
757750
758751 // Both tracer providers will be dropped at the end of this scope
759752 }
0 commit comments