This is an automated email from the ASF dual-hosted git repository. marcuse pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push: new e61c09e Fix potentially flaky ImportTest e61c09e is described below commit e61c09eaf5e0b3f5d374032a690ea4bf17b36e2f Author: Marcus Eriksson <marc...@apache.org> AuthorDate: Wed Jan 22 19:11:55 2020 +0100 Fix potentially flaky ImportTest Patch by marcuse; reviewed by David Capwell for CASSANDRA-15517 --- test/unit/org/apache/cassandra/db/ImportTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/org/apache/cassandra/db/ImportTest.java b/test/unit/org/apache/cassandra/db/ImportTest.java index 5ceb233..4094aa4 100644 --- a/test/unit/org/apache/cassandra/db/ImportTest.java +++ b/test/unit/org/apache/cassandra/db/ImportTest.java @@ -308,7 +308,7 @@ public class ImportTest extends CQLTester getCurrentColumnFamilyStore().clearUnsafe(); File backupdirCorrect = moveToBackupDir(correctSSTables); - File [] beforeImport = backupdir.listFiles(); + Set<File> beforeImport = Sets.newHashSet(backupdir.listFiles()); // first we moved out 2 sstables, one correct and one corrupt in to a single directory (backupdir) // then we moved out 1 sstable, a correct one (in backupdirCorrect). // now import should fail import on backupdir, but import the one in backupdirCorrect. @@ -323,7 +323,7 @@ public class ImportTest extends CQLTester assertTrue("pk = "+pk, pk >= 100 && pk < 130); } assertEquals("Data dir should contain one file", 1, countFiles(getCurrentColumnFamilyStore().getDirectories().getDirectoryForNewSSTables())); - assertArrayEquals("backupdir contained 2 files before import, should still contain 2 after failing to import it", beforeImport, backupdir.listFiles()); + assertEquals("backupdir contained 2 files before import, should still contain 2 after failing to import it", beforeImport, Sets.newHashSet(backupdir.listFiles())); assertEquals("backupdirCorrect contained 1 file before import, should be empty after import", 0, countFiles(backupdirCorrect)); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org