Skip to content

Commit 8e07dd4

Browse files
jozkeeadamsitnik
andauthored
Wait for serverTask before asserting IsCompletedSuccessfully (#79071)
* Wait for serverTask before asserting IsCompletedSuccessfully * Apply suggestions from code review Co-authored-by: Adam Sitnik <[email protected]>
1 parent 3f51e14 commit 8e07dd4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CurrentUserOnly.Windows.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ public void Connection_UnderDifferentUsers_BehavesAsExpected(
197197
{
198198
// When CurrentUserOnly is only on client side and asks for ReadOnly access, the connection is not rejected
199199
// but we get the UnauthorizedAccessException on the client regardless.
200+
Assert.True(serverTask.Wait(TimeSpan.FromSeconds(10)));
200201
Assert.True(serverTask.IsCompletedSuccessfully);
201202
}
202203
else

0 commit comments

Comments
 (0)