You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This test is flaky because there is a race condition. If the extra thread calls the read method before the test writes the second string, then the read method will not wait for new bytes and will return -1 because the download state is COMPLETED. The test only passes when the timing works out such that the write happens before the extra thread calls the read method. Now, the test sets the download state to IN_PROGRESS, so the read method will correctly wait for new bytes if it is called before the write happens.
Copy file name to clipboardExpand all lines: catalog/core/catalog-core-standardframework/src/test/java/ddf/catalog/resource/download/ReliableResourceInputStreamTest.java
+24-22Lines changed: 24 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -149,11 +149,13 @@ public void testReadByteBufferFbosBytesWritten() throws Exception {
0 commit comments