This is an automated email from the ASF dual-hosted git repository.
edimitrova 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 5768e5ae41 Assert successful exit code from sstabledump in
org.apache.cassandra.cql3.EmptyValuesTest patch by Daniel Jatnieks; reviewed by
Ekaterina Dimitrova and Berenguer Blasi for CASSANDRA-18436
5768e5ae41 is described below
commit 5768e5ae41879885e7e2aca79b38bed53df55711
Author: Daniel Jatnieks <[email protected]>
AuthorDate: Thu May 4 12:39:46 2023 -0700
Assert successful exit code from sstabledump in
org.apache.cassandra.cql3.EmptyValuesTest
patch by Daniel Jatnieks; reviewed by Ekaterina Dimitrova and Berenguer
Blasi for CASSANDRA-18436
---
test/unit/org/apache/cassandra/cql3/EmptyValuesTest.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/test/unit/org/apache/cassandra/cql3/EmptyValuesTest.java
b/test/unit/org/apache/cassandra/cql3/EmptyValuesTest.java
index 3652ac8d14..ff7f861b5f 100644
--- a/test/unit/org/apache/cassandra/cql3/EmptyValuesTest.java
+++ b/test/unit/org/apache/cassandra/cql3/EmptyValuesTest.java
@@ -19,7 +19,6 @@
package org.apache.cassandra.cql3;
import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
import java.nio.charset.StandardCharsets;
import java.util.regex.Pattern;
@@ -73,17 +72,20 @@ public class EmptyValuesTest extends CQLTester
ByteArrayOutputStream buf = new ByteArrayOutputStream();
for (SSTableReader ssTable : cfs.getLiveSSTables())
{
- try (PrintStream out = new PrintStream(buf, true))
+ int exitValue = 0;
+ try
{
ProcessBuilder pb = new
ProcessBuilder("tools/bin/sstabledump", ssTable.getFilename());
+ pb.redirectErrorStream(true);
Process process = pb.start();
- process.waitFor();
+ exitValue = process.waitFor();
IOUtils.copy(process.getInputStream(), buf);
}
catch (Throwable t)
{
Assert.fail(t.getClass().getName());
}
+ Assert.assertEquals(buf.toString(), 0, exitValue);
}
String outString = new String(buf.toByteArray(),
StandardCharsets.UTF_8);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]