Hao Hao has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/15362 )
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 Reviewed-on: http://gerrit.cloudera.org:8080/15362 Tested-by: Andrew Wong <[email protected]> Reviewed-by: Hao Hao <[email protected]> --- 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(-) Approvals: Andrew Wong: Verified Hao Hao: Looks good to me, approved -- 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: merged Gerrit-Change-Id: I351ae84285fa5eb9db5dcc374dd404e475a9ddb4 Gerrit-Change-Number: 15362 Gerrit-PatchSet: 3 Gerrit-Owner: Andrew Wong <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Hao Hao <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120)
