tighten conditions

pull/5/head
Zlatin Balevsky 2019-06-21 05:45:11 +01:00
parent f9777d29f4
commit 5504dd2251
1 changed files with 7 additions and 1 deletions

View File

@ -114,6 +114,8 @@ class DownloadSessionTest {
Thread.sleep(150)
assert pieces.isComplete()
assert target.bytes == source.bytes
assert performed
assert available.isEmpty()
}
@Test
@ -144,6 +146,8 @@ class DownloadSessionTest {
Thread.sleep(150)
assert !pieces.isComplete()
assert 1 == pieces.donePieces()
assert performed
assert available.isEmpty()
}
@Test
@ -151,7 +155,9 @@ class DownloadSessionTest {
initSession(20, [0])
long now = System.currentTimeMillis()
downloadThread.join(100)
assert 100 > (System.currentTimeMillis() - now)
assert 100 >= (System.currentTimeMillis() - now)
assert !performed
assert available.isEmpty()
}
@Test