File tree Expand file tree Collapse file tree
sdks/rust/tests/test-counter/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,15 +142,20 @@ impl TestCounter {
142142 inner. outcomes . len ( ) == inner. registered . len ( )
143143 } ;
144144
145+ let mut finished = false ;
145146 for _ in 0 ..MAX_WAIT_ITERATIONS {
146147 if all_tests_finished ( ) {
147- return ;
148+ // We still need the final outcome pass below. Returning here would incorrectly
149+ // treat recorded `Err(...)` test outcomes as success, including harness tests that
150+ // intentionally exercise the failure path.
151+ finished = true ;
152+ break ;
148153 }
149154 TimeoutFuture :: new ( WAIT_INTERVAL_MS ) . await ;
150155 }
151156
152157 let lock = self . inner . lock ( ) . expect ( "TestCounterInner Mutex is poisoned" ) ;
153- if lock. outcomes . len ( ) != lock. registered . len ( ) {
158+ if !finished || lock. outcomes . len ( ) != lock. registered . len ( ) {
154159 let mut timeout_count = 0 ;
155160 let mut failed_count = 0 ;
156161 for test in lock. registered . iter ( ) {
You can’t perform that action at this time.
0 commit comments