diff --git a/query/api-src/org/labkey/remoteapi/SelectRowsStreamHack.java b/query/api-src/org/labkey/remoteapi/SelectRowsStreamHack.java index f4fa547477b..856d5356909 100644 --- a/query/api-src/org/labkey/remoteapi/SelectRowsStreamHack.java +++ b/query/api-src/org/labkey/remoteapi/SelectRowsStreamHack.java @@ -195,17 +195,13 @@ public void testFileDeletion() throws Exception DataIteratorContext dic = new DataIteratorContext(); DataIterator di = dib.getDataIterator(dic); - - // This should create the file: - Set actualTempFiles = getMatchingTempFileNames(); - assertEquals("Temp file not created", preexistingTempFiles.size() + 1, actualTempFiles.size()); - + // This should iterate and close the stream: long actualCount = di.stream().count(); assertEquals("Incorrect row count", expectedRows, actualCount); // The file should be deleted now: - actualTempFiles = getMatchingTempFileNames(); + Set actualTempFiles = getMatchingTempFileNames(); actualTempFiles.removeAll(preexistingTempFiles); assertEquals("Temp files were not deleted, found: " + actualTempFiles.size(), 0, actualTempFiles.size());