Fix junit failure for SSTableReaderTest#testOpeningSSTable Patch by Dinesh Joshi; Reviewed by Chris Lohfink for CASSANDRA-14387
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e16f0ed0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e16f0ed0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e16f0ed0 Branch: refs/heads/cassandra-3.11 Commit: e16f0ed0698c5cb47ab2bb0a0b04966d5bdbcde0 Parents: b2f6ce9 Author: Dinesh A. Joshi <dinesh.jo...@apple.com> Authored: Mon Apr 16 10:18:22 2018 -0700 Committer: Aleksey Yeshchenko <alek...@apple.com> Committed: Mon Apr 30 19:09:01 2018 +0100 ---------------------------------------------------------------------- .../org/apache/cassandra/io/sstable/SSTableReaderTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e16f0ed0/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java ---------------------------------------------------------------------- diff --git a/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java b/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java index 50519b2..4ca6ec0 100644 --- a/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java +++ b/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java @@ -385,7 +385,7 @@ public class SSTableReaderTest long bloomModified = Files.getLastModifiedTime(bloomPath).toMillis(); long summaryModified = Files.getLastModifiedTime(summaryPath).toMillis(); - Thread.sleep(TimeUnit.MILLISECONDS.toMillis(10)); // sleep to ensure modified time will be different + TimeUnit.MILLISECONDS.sleep(1000); // sleep to ensure modified time will be different // Offline tests // check that bloomfilter/summary ARE NOT regenerated @@ -432,7 +432,7 @@ public class SSTableReaderTest summaryModified = Files.getLastModifiedTime(summaryPath).toMillis(); summaryFile.delete(); - Thread.sleep(TimeUnit.MILLISECONDS.toMillis(10)); // sleep to ensure modified time will be different + TimeUnit.MILLISECONDS.sleep(1000); // sleep to ensure modified time will be different bloomModified = Files.getLastModifiedTime(bloomPath).toMillis(); target = SSTableReader.open(desc, components, store.metadata); @@ -449,7 +449,7 @@ public class SSTableReaderTest summaryModified = Files.getLastModifiedTime(summaryPath).toMillis(); target = SSTableReader.open(desc, components, store.metadata, false, false); - Thread.sleep(TimeUnit.MILLISECONDS.toMillis(10)); // sleep to ensure modified time will be different + TimeUnit.MILLISECONDS.sleep(1000); // sleep to ensure modified time will be different assertEquals(bloomModified, Files.getLastModifiedTime(bloomPath).toMillis()); assertEquals(summaryModified, Files.getLastModifiedTime(summaryPath).toMillis()); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org