ivankelly commented on a change in pull request #2888: PIP-25: Token based 
authentication
URL: https://github.com/apache/pulsar/pull/2888#discussion_r237040582
 
 

 ##########
 File path: 
tests/integration/src/test/java/org/apache/pulsar/tests/integration/utils/DockerUtils.java
 ##########
 @@ -236,6 +239,82 @@ public void onComplete() {
         return result;
     }
 
+    public static ContainerExecResultBytes 
runCommandWithRawOutput(DockerClient docker,
+            String containerId,
+            String... cmd)
+            throws ContainerExecException {
+        CompletableFuture<Boolean> future = new CompletableFuture<>();
+        String execid = docker.execCreateCmd(containerId)
+                .withCmd(cmd)
+                .withAttachStderr(true)
+                .withAttachStdout(true)
+                .exec()
+                .getId();
+        String cmdString = Arrays.stream(cmd).collect(Collectors.joining(" "));
+        ByteBuf stdout = Unpooled.buffer();
+        ByteBuf stderr = Unpooled.buffer();
+        docker.execStartCmd(execid).withDetach(false)
 
 Review comment:
   There's a lot of code in common with runCommand here. Doesn't need to be in 
this patch, but it should be factors out to something that takes a 
```Consumer<byte[]>```

----------------------------------------------------------------
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