You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/09/09 22:56:54 UTC

[GitHub] [cassandra-in-jvm-dtest-api] yifan-c opened a new pull request #16: Include captured console output string in NodeToolResult

yifan-c opened a new pull request #16:
URL: https://github.com/apache/cassandra-in-jvm-dtest-api/pull/16


   - If captured console output is null, the test code does not implement the capture function
   - If captured console output is empty, there is no output captured.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra-in-jvm-dtest-api] dcapwell commented on a change in pull request #16: Include captured console output string in NodeToolResult

Posted by GitBox <gi...@apache.org>.
dcapwell commented on a change in pull request #16:
URL: https://github.com/apache/cassandra-in-jvm-dtest-api/pull/16#discussion_r487216839



##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()

Review comment:
       for consistency, can we use `getStdout` or update asserts to be camel cased with the O?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()
+    {
+        return capturedConsoleOut;
+    }
+
+    public String getStdErr()

Review comment:
       came comment as above, asserts are `stderr` but this is `stdErr`, should pick one and stick with it.

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -134,6 +153,29 @@ public Asserts notificationContains(ProgressEventType type, String msg)
             return this; // unreachable
         }
 
+        public Asserts stdoutContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, true);
+        }
+
+        public Asserts stderrContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, false);
+        }
+
+        private Asserts capturedConsoleOutputContains(String substring, boolean isOut)
+        {
+            String name = isOut ? "capturedConsoleOut" : "capturedConsoleErr";

Review comment:
       can we use `stdout` and `stderr` here rather than capturedConsole?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra-in-jvm-dtest-api] dcapwell commented on a change in pull request #16: Include captured console output string in NodeToolResult

Posted by GitBox <gi...@apache.org>.
dcapwell commented on a change in pull request #16:
URL: https://github.com/apache/cassandra-in-jvm-dtest-api/pull/16#discussion_r486699333



##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -37,12 +37,22 @@
     private final List<Notification> notifications;
     private final Throwable error;
 
+    public final String capturedConsoleOut;

Review comment:
       make these private with a getter to match the rest of the code




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra-in-jvm-dtest-api] yifan-c commented on pull request #16: Include captured console output string in NodeToolResult

Posted by GitBox <gi...@apache.org>.
yifan-c commented on pull request #16:
URL: https://github.com/apache/cassandra-in-jvm-dtest-api/pull/16#issuecomment-691259329


   Thanks! Variable names updated.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra-in-jvm-dtest-api] dcapwell commented on a change in pull request #16: Include captured console output string in NodeToolResult

Posted by GitBox <gi...@apache.org>.
dcapwell commented on a change in pull request #16:
URL: https://github.com/apache/cassandra-in-jvm-dtest-api/pull/16#discussion_r487216839



##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()

Review comment:
       for consistency, can we use `getStdout` or update asserts to be camel cased with the O?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()
+    {
+        return capturedConsoleOut;
+    }
+
+    public String getStdErr()

Review comment:
       came comment as above, asserts are `stderr` but this is `stdErr`, should pick one and stick with it.

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -134,6 +153,29 @@ public Asserts notificationContains(ProgressEventType type, String msg)
             return this; // unreachable
         }
 
+        public Asserts stdoutContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, true);
+        }
+
+        public Asserts stderrContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, false);
+        }
+
+        private Asserts capturedConsoleOutputContains(String substring, boolean isOut)
+        {
+            String name = isOut ? "capturedConsoleOut" : "capturedConsoleErr";

Review comment:
       can we use `stdout` and `stderr` here rather than capturedConsole?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()

Review comment:
       for consistency, can we use `getStdout` or update asserts to be camel cased with the O?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()
+    {
+        return capturedConsoleOut;
+    }
+
+    public String getStdErr()

Review comment:
       came comment as above, asserts are `stderr` but this is `stdErr`, should pick one and stick with it.

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -134,6 +153,29 @@ public Asserts notificationContains(ProgressEventType type, String msg)
             return this; // unreachable
         }
 
+        public Asserts stdoutContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, true);
+        }
+
+        public Asserts stderrContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, false);
+        }
+
+        private Asserts capturedConsoleOutputContains(String substring, boolean isOut)
+        {
+            String name = isOut ? "capturedConsoleOut" : "capturedConsoleErr";

Review comment:
       can we use `stdout` and `stderr` here rather than capturedConsole?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()

Review comment:
       for consistency, can we use `getStdout` or update asserts to be camel cased with the O?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()
+    {
+        return capturedConsoleOut;
+    }
+
+    public String getStdErr()

Review comment:
       came comment as above, asserts are `stderr` but this is `stdErr`, should pick one and stick with it.

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -134,6 +153,29 @@ public Asserts notificationContains(ProgressEventType type, String msg)
             return this; // unreachable
         }
 
+        public Asserts stdoutContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, true);
+        }
+
+        public Asserts stderrContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, false);
+        }
+
+        private Asserts capturedConsoleOutputContains(String substring, boolean isOut)
+        {
+            String name = isOut ? "capturedConsoleOut" : "capturedConsoleErr";

Review comment:
       can we use `stdout` and `stderr` here rather than capturedConsole?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra-in-jvm-dtest-api] dcapwell commented on a change in pull request #16: Include captured console output string in NodeToolResult

Posted by GitBox <gi...@apache.org>.
dcapwell commented on a change in pull request #16:
URL: https://github.com/apache/cassandra-in-jvm-dtest-api/pull/16#discussion_r487217299



##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -134,6 +153,29 @@ public Asserts notificationContains(ProgressEventType type, String msg)
             return this; // unreachable
         }
 
+        public Asserts stdoutContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, true);
+        }
+
+        public Asserts stderrContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, false);
+        }
+
+        private Asserts capturedConsoleOutputContains(String substring, boolean isOut)
+        {
+            String name = isOut ? "capturedConsoleOut" : "capturedConsoleErr";

Review comment:
       can we use `stdout` and `stderr` here rather than capturedConsole?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra-in-jvm-dtest-api] yifan-c commented on pull request #16: Include captured console output string in NodeToolResult

Posted by GitBox <gi...@apache.org>.
yifan-c commented on pull request #16:
URL: https://github.com/apache/cassandra-in-jvm-dtest-api/pull/16#issuecomment-691259329


   Thanks! Variable names updated.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra-in-jvm-dtest-api] dcapwell commented on a change in pull request #16: Include captured console output string in NodeToolResult

Posted by GitBox <gi...@apache.org>.
dcapwell commented on a change in pull request #16:
URL: https://github.com/apache/cassandra-in-jvm-dtest-api/pull/16#discussion_r486690846



##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -134,6 +144,30 @@ public Asserts notificationContains(ProgressEventType type, String msg)
             return this; // unreachable
         }
 
+        public Asserts capturedConsoleOutContains(String substring)

Review comment:
       maybe `stdoutContains` and `stderrContains`?  `capturedConsole` I don't feel is needed in the name

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -134,6 +144,30 @@ public Asserts notificationContains(ProgressEventType type, String msg)
             return this; // unreachable
         }
 
+        public Asserts capturedConsoleOutContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, true);
+        }
+
+        public Asserts capturedConsoleErrContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, false);
+        }
+
+        private Asserts capturedConsoleOutputContains(String substring, boolean isOut)
+        {
+            String name = isOut ? "capturedConsoleOut" : "capturedConsoleErr";
+            String output = isOut ? capturedConsoleOut : capturedConsoleErr;
+            AssertUtils.assertNotNull(name + " not defined", output);
+            AssertUtils.assertFalse("Found no " + name, output.isEmpty());

Review comment:
       do we care about that, `""` does not contain `"match"` so the fail should be fine

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -134,6 +144,30 @@ public Asserts notificationContains(ProgressEventType type, String msg)
             return this; // unreachable
         }
 
+        public Asserts capturedConsoleOutContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, true);
+        }
+
+        public Asserts capturedConsoleErrContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, false);
+        }
+
+        private Asserts capturedConsoleOutputContains(String substring, boolean isOut)
+        {
+            String name = isOut ? "capturedConsoleOut" : "capturedConsoleErr";
+            String output = isOut ? capturedConsoleOut : capturedConsoleErr;
+            AssertUtils.assertNotNull(name + " not defined", output);

Review comment:
       can only use these if-and-only-if the C* version supports capturing; fair as we can't throw `org.junit.AssumptionViolatedException` to skip the test




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra-in-jvm-dtest-api] dcapwell commented on a change in pull request #16: Include captured console output string in NodeToolResult

Posted by GitBox <gi...@apache.org>.
dcapwell commented on a change in pull request #16:
URL: https://github.com/apache/cassandra-in-jvm-dtest-api/pull/16#discussion_r487217086



##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()
+    {
+        return capturedConsoleOut;
+    }
+
+    public String getStdErr()

Review comment:
       came comment as above, asserts are `stderr` but this is `stdErr`, should pick one and stick with it.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra-in-jvm-dtest-api] michaelsembwever closed pull request #16: Include captured console output string in NodeToolResult

Posted by GitBox <gi...@apache.org>.
michaelsembwever closed pull request #16:
URL: https://github.com/apache/cassandra-in-jvm-dtest-api/pull/16


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra-in-jvm-dtest-api] yifan-c commented on pull request #16: Include captured console output string in NodeToolResult

Posted by GitBox <gi...@apache.org>.
yifan-c commented on pull request #16:
URL: https://github.com/apache/cassandra-in-jvm-dtest-api/pull/16#issuecomment-691259329






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra-in-jvm-dtest-api] dcapwell commented on a change in pull request #16: Include captured console output string in NodeToolResult

Posted by GitBox <gi...@apache.org>.
dcapwell commented on a change in pull request #16:
URL: https://github.com/apache/cassandra-in-jvm-dtest-api/pull/16#discussion_r487216839



##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()

Review comment:
       for consistency, can we use `getStdout` or update asserts to be camel cased with the O?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra-in-jvm-dtest-api] dcapwell commented on a change in pull request #16: Include captured console output string in NodeToolResult

Posted by GitBox <gi...@apache.org>.
dcapwell commented on a change in pull request #16:
URL: https://github.com/apache/cassandra-in-jvm-dtest-api/pull/16#discussion_r487216839



##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()

Review comment:
       for consistency, can we use `getStdout` or update asserts to be camel cased with the O?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()
+    {
+        return capturedConsoleOut;
+    }
+
+    public String getStdErr()

Review comment:
       came comment as above, asserts are `stderr` but this is `stdErr`, should pick one and stick with it.

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -134,6 +153,29 @@ public Asserts notificationContains(ProgressEventType type, String msg)
             return this; // unreachable
         }
 
+        public Asserts stdoutContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, true);
+        }
+
+        public Asserts stderrContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, false);
+        }
+
+        private Asserts capturedConsoleOutputContains(String substring, boolean isOut)
+        {
+            String name = isOut ? "capturedConsoleOut" : "capturedConsoleErr";

Review comment:
       can we use `stdout` and `stderr` here rather than capturedConsole?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()

Review comment:
       for consistency, can we use `getStdout` or update asserts to be camel cased with the O?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()
+    {
+        return capturedConsoleOut;
+    }
+
+    public String getStdErr()

Review comment:
       came comment as above, asserts are `stderr` but this is `stdErr`, should pick one and stick with it.

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -134,6 +153,29 @@ public Asserts notificationContains(ProgressEventType type, String msg)
             return this; // unreachable
         }
 
+        public Asserts stdoutContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, true);
+        }
+
+        public Asserts stderrContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, false);
+        }
+
+        private Asserts capturedConsoleOutputContains(String substring, boolean isOut)
+        {
+            String name = isOut ? "capturedConsoleOut" : "capturedConsoleErr";

Review comment:
       can we use `stdout` and `stderr` here rather than capturedConsole?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()

Review comment:
       for consistency, can we use `getStdout` or update asserts to be camel cased with the O?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()
+    {
+        return capturedConsoleOut;
+    }
+
+    public String getStdErr()

Review comment:
       came comment as above, asserts are `stderr` but this is `stdErr`, should pick one and stick with it.

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -134,6 +153,29 @@ public Asserts notificationContains(ProgressEventType type, String msg)
             return this; // unreachable
         }
 
+        public Asserts stdoutContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, true);
+        }
+
+        public Asserts stderrContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, false);
+        }
+
+        private Asserts capturedConsoleOutputContains(String substring, boolean isOut)
+        {
+            String name = isOut ? "capturedConsoleOut" : "capturedConsoleErr";

Review comment:
       can we use `stdout` and `stderr` here rather than capturedConsole?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()

Review comment:
       for consistency, can we use `getStdout` or update asserts to be camel cased with the O?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()
+    {
+        return capturedConsoleOut;
+    }
+
+    public String getStdErr()

Review comment:
       came comment as above, asserts are `stderr` but this is `stdErr`, should pick one and stick with it.

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -134,6 +153,29 @@ public Asserts notificationContains(ProgressEventType type, String msg)
             return this; // unreachable
         }
 
+        public Asserts stdoutContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, true);
+        }
+
+        public Asserts stderrContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, false);
+        }
+
+        private Asserts capturedConsoleOutputContains(String substring, boolean isOut)
+        {
+            String name = isOut ? "capturedConsoleOut" : "capturedConsoleErr";

Review comment:
       can we use `stdout` and `stderr` here rather than capturedConsole?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()

Review comment:
       for consistency, can we use `getStdout` or update asserts to be camel cased with the O?

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -65,6 +74,16 @@ public Throwable getError()
         return error;
     }
 
+    public String getStdOut()
+    {
+        return capturedConsoleOut;
+    }
+
+    public String getStdErr()

Review comment:
       came comment as above, asserts are `stderr` but this is `stdErr`, should pick one and stick with it.

##########
File path: src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
##########
@@ -134,6 +153,29 @@ public Asserts notificationContains(ProgressEventType type, String msg)
             return this; // unreachable
         }
 
+        public Asserts stdoutContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, true);
+        }
+
+        public Asserts stderrContains(String substring)
+        {
+            return capturedConsoleOutputContains(substring, false);
+        }
+
+        private Asserts capturedConsoleOutputContains(String substring, boolean isOut)
+        {
+            String name = isOut ? "capturedConsoleOut" : "capturedConsoleErr";

Review comment:
       can we use `stdout` and `stderr` here rather than capturedConsole?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


[GitHub] [cassandra-in-jvm-dtest-api] yifan-c commented on pull request #16: Include captured console output string in NodeToolResult

Posted by GitBox <gi...@apache.org>.
yifan-c commented on pull request #16:
URL: https://github.com/apache/cassandra-in-jvm-dtest-api/pull/16#issuecomment-691259329






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org