File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/Renci.SshNet.Tests/Classes/Common Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -334,7 +334,10 @@ public void WaitHandle_WaitOne_ShouldReturnFalseWhenTimeoutExpiresBeforeCountdow
334334 Assert . IsFalse ( actual ) ;
335335 Assert . IsFalse ( countdownEvent . IsSet ) ;
336336 Assert . IsFalse ( countdownEvent . WaitHandle . WaitOne ( 0 ) ) ;
337- Assert . IsTrue ( watch . Elapsed >= timeout ) ;
337+ // Use precision because it fail in CI/CD pipeline on .NET 7. Locally it worked without precision.
338+ // But I think it is not supper important because this is internal .NET implementation.
339+ var precision = TimeSpan . FromMilliseconds ( 6 ) ;
340+ Assert . IsTrue ( watch . Elapsed >= timeout . Subtract ( precision ) ) ;
338341
339342 countdownEvent . Wait ( Session . InfiniteTimeSpan ) ;
340343 countdownEvent . Dispose ( ) ;
You can’t perform that action at this time.
0 commit comments