소스 검색

Attempt to harden test.

Gert Driesen 8 년 전
부모
커밋
d93f064c0f
1개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 5
      src/Renci.SshNet.Tests/Classes/Sftp/SftpFileReaderTest_DisposeShouldUnblockReadAndReadAhead.cs

+ 3 - 5
src/Renci.SshNet.Tests/Classes/Sftp/SftpFileReaderTest_DisposeShouldUnblockReadAndReadAhead.cs

@@ -97,12 +97,10 @@ namespace Renci.SshNet.Tests.Classes.Sftp
             {
                 _actualException = ex;
             }
-        }
 
-        [TestMethod]
-        public void DisposeShouldHaveCompleted()
-        {
-            Assert.IsTrue(_disposeCompleted.WaitOne(0));
+            // Dispose may unblock Read() before the dispose has fully completed, so
+            // let's wait until it has completed
+            _disposeCompleted.WaitOne(500);
         }
 
         [TestMethod]