Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-16003

ToolRunner added in CASSANDRA-15942 stdErr checks improvements

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 4.0-beta2, 4.0
    • Component/s: Test/unit
    • Labels:
      None

      Description

      The JVM will output to stderr on some environments to show what flags that were picked up, when this happens all tests which validate stderr start to fail. This was found in the org.apache.cassandra.tools.ClearSnapshotTest as it switched to use the ToolRunner; below is a sample failure on my laptop (I had to modify the asserts since they don’t include the input)

      java.lang.AssertionError: 
      Expecting empty but was:<"Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
      ">
      
      	at org.apache.cassandra.tools.ToolRunner.assertEmptyStdErr(ToolRunner.java:339)
      	at org.apache.cassandra.tools.ToolRunner.waitAndAssertOnCleanExit(ToolRunner.java:334)
      	at org.apache.cassandra.tools.ClearSnapshotTest.testClearSnapshot_RemoveMultiple(ClearSnapshotTest.java:91)
      

      Here _JAVA_OPTIONS is used globally on my system so fails the test; there is also JAVA_TOOL_RUNNER which is used the same way.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bereng Berenguer Blasi
                Reporter:
                dcapwell David Capwell
                Authors:
                Berenguer Blasi
                Reviewers:
                David Capwell
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m