David Ribeiro Alves has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8847 )

Change subject: KUDU-1704: add java client support for READ_YOUR_WRITES mode
......................................................................


Patch Set 7:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8847/7/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
File java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java:

http://gerrit.cloudera.org:8080/#/c/8847/7/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java@1150
PS7, Line 1150:     // Fail the main thread if ever encounter AssertionError.
              :     if (assertionError != null) {
              :       fail("the test should not throw AssertionError: " + 
assertionError);
              :     }
> Since the JUnit only captures assertion errors in the main thread of the te
right this kind of mess is why futures are much better (and the impl in line 
918 seems to have a bug btw).
you could not catch the exception in the thread and just have
ExecutorService threadPool = Executors.newFixedThreadPool(3);
Future<?> future = threadPool.submit(new MyTest());

when you do future.get() if an exception occurred it'll propagate to the caller 
thread, no need to catch any exception inside runnable



--
To view, visit http://gerrit.cloudera.org:8080/8847
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6239521c022147257859e399f55c6f3f945af465
Gerrit-Change-Number: 8847
Gerrit-PatchSet: 7
Gerrit-Owner: Hao Hao <hao....@cloudera.com>
Gerrit-Reviewer: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <davidral...@gmail.com>
Gerrit-Reviewer: Hao Hao <hao....@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Comment-Date: Tue, 06 Mar 2018 22:43:55 +0000
Gerrit-HasComments: Yes

Reply via email to