This is an automated email from the ASF dual-hosted git repository.
adelapena 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 a702531 Fix flaky testRecoverOverflowedExpirationWithSSTableScrub
a702531 is described below
commit a70253124681d006c865441b194d76d8e3058d64
Author: Bereng <[email protected]>
AuthorDate: Wed Mar 31 21:12:11 2021 +0100
Fix flaky testRecoverOverflowedExpirationWithSSTableScrub
patch by Berenguer Blasi; reviewed by Andrés de la Peña for CASSANDRA-16546
---
.../cassandra/cql3/validation/operations/TTLTest.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git
a/test/unit/org/apache/cassandra/cql3/validation/operations/TTLTest.java
b/test/unit/org/apache/cassandra/cql3/validation/operations/TTLTest.java
index 6f73e83..13cbdf3 100644
--- a/test/unit/org/apache/cassandra/cql3/validation/operations/TTLTest.java
+++ b/test/unit/org/apache/cassandra/cql3/validation/operations/TTLTest.java
@@ -422,18 +422,29 @@ public class TTLTest extends CQLTester
else
tool = ToolRunner.invokeClass(StandaloneScrubber.class,
KEYSPACE, cfs.name);
+ tool.assertOnCleanExit();
Assertions.assertThat(tool.getStdout()).contains("Pre-scrub
sstables snapshotted into");
if (reinsertOverflowedTTL)
Assertions.assertThat(tool.getStdout()).contains("Fixed 2
rows with overflowed local deletion time.");
else
Assertions.assertThat(tool.getStdout()).contains("Unable
to recover 2 rows that were skipped.");
- tool.assertOnCleanExit();
}
finally
{
System.clearProperty(org.apache.cassandra.tools.Util.ALLOW_TOOL_REINIT_FOR_TEST);
}
}
+
+ try
+ {
+ dropTable("DROP TABLE %s");
+ }
+ catch (Throwable e)
+ {
+ // StandaloneScrubber.class should be ran as a tool with a stable
env. In a test env there are things moving
+ // under its feet such as the async CQLTester.afterTest()
operations. We try to sync cleanup of tables here
+ // but we need to catch any exceptions we might run into bc of the
hack. See CASSANDRA-16546
+ }
}
private void copySSTablesToTableDir(String table, boolean simple, boolean
clustering) throws IOException
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]