Skip to content

Commit 1b28947

Browse files
committed
Attempt to harden test.
1 parent c0caf7d commit 1b28947

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofReceived.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ private void Arrange()
6565
new Thread(() =>
6666
{
6767
Thread.Sleep(100);
68+
// signal that the ChannelCloseMessage was received; we use this to verify whether we've actually
69+
// waited on the EventWaitHandle to be set
70+
_channelClosedReceived.Set();
6871
// raise ChannelCloseReceived event to set waithandle for receiving
6972
// SSH_MSG_CHANNEL_CLOSE message from server which is waited on after
7073
// sending the SSH_MSG_CHANNEL_CLOSE message to the server
@@ -73,9 +76,6 @@ private void Arrange()
7376
// to get the channel in the state that it would have after actually receiving
7477
// the ChannelCloseMessage
7578
_sessionMock.Raise(s => s.ChannelCloseReceived += null, new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
76-
// signal that the ChannelCloseMessage was received; we use this to verify whether we've actually
77-
// waited on the EventWaitHandle to be set
78-
_channelClosedReceived.Set();
7979
}).Start();
8080
w.WaitOne();
8181
});

0 commit comments

Comments
 (0)