sijie commented on a change in pull request #2233:  [integration tests] Return 
exit code as part of execution result of running a command in testcontainers
URL: https://github.com/apache/incubator-pulsar/pull/2233#discussion_r205288351
 
 

 ##########
 File path: 
tests/integration/src/test/java/org/apache/pulsar/tests/integration/utils/DockerUtils.java
 ##########
 @@ -162,16 +164,26 @@ public static String getContainerIP(DockerClient docker, 
String containerId) {
         throw new IllegalArgumentException("Container " + containerId + " has 
no networks");
     }
 
-    public static String getContainerHostname(DockerClient docker, String 
containerId) {
-        return runCommand(docker, containerId, "hostname").trim();
+    public static ContainerExecResult runCommand(DockerClient docker, String 
containerId, String... cmd)
+            throws Exception {
+        return runCommand(docker, containerId, false, cmd);
     }
 
-    public static String runCommand(DockerClient docker, String containerId, 
String... cmd) {
+    public static ContainerExecResult runCommand(DockerClient docker,
+                                                 String containerId,
+                                                 boolean ignoreError,
 
 Review comment:
   good idea. will work on that in the next PR.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to