You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Andrew Wong (Code Review)" <ge...@cloudera.org> on 2020/03/05 03:27:43 UTC

[kudu-CR] subprocess: fix TestEchoSubprocess

Hello Attila Bukor, Kudu Jenkins, Adar Dembo, Grant Henke, Hao Hao, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/15362

to look at the new patch set (#2).

Change subject: subprocess: fix TestEchoSubprocess
......................................................................

subprocess: fix TestEchoSubprocess

There were a number of issues with TestEchoSubprocess:
- Many tests coarsely expected timeouts, leading to the non-execution of
  many parts of the test. Instead, I wrapped executor.run() with a
  executor.runUntilTimeout() that expects the timeout, rather than
  relying on test-level expectation of timeouts.
- Initializing BufferedInputStream with the same pipe multiple times led
  to us to miss out on some bytes in the pipe. This initializes the
  BufferedInputStream once as a member.
- testMsgWithEmptyMessage() wouldn't time out because its readers were
  stuck parsing an empty pipe. This is resolved by adding more requests
  to the pipe.

Change-Id: I351ae84285fa5eb9db5dcc374dd404e475a9ddb4
---
M java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/SubprocessExecutor.java
M java/kudu-subprocess/src/test/java/org/apache/kudu/subprocess/SubprocessTestUtil.java
M java/kudu-subprocess/src/test/java/org/apache/kudu/subprocess/echo/TestEchoSubprocess.java
3 files changed, 48 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/62/15362/2
-- 
To view, visit http://gerrit.cloudera.org:8080/15362
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I351ae84285fa5eb9db5dcc374dd404e475a9ddb4
Gerrit-Change-Number: 15362
Gerrit-PatchSet: 2
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)