ivankelly commented on a change in pull request #1137: Fix test regression due 
to change in default ledger manager
URL: https://github.com/apache/bookkeeper/pull/1137#discussion_r167498246
 
 

 ##########
 File path: 
bookkeeper-benchmark/src/test/java/org/apache/bookkeeper/benchmark/TestBenchmark.java
 ##########
 @@ -66,27 +81,20 @@ public void testBookie() throws Exception {
 
     @Test
     public void testReadThroughputLatency() throws Exception {
-        final AtomicBoolean threwException = new AtomicBoolean(false);
-        Thread t = new Thread() {
-                public void run() {
-                    try {
-                        BenchReadThroughputLatency.main(new String[] {
-                                "--zookeeper", 
zkUtil.getZooKeeperConnectString(),
-                                "--listen", "10"});
-                    } catch (Throwable t) {
-                        LOG.error("Error reading", t);
-                        threwException.set(true);
-                    }
-                }
-            };
-        t.start();
+        ExecutorService executor = Executors.newSingleThreadExecutor(
+                new 
ThreadFactoryBuilder().setNameFormat("read-throughput-latency-test").build());
+        Future<Integer> f = executor.submit(() -> {
+                BenchReadThroughputLatency.main(new String[] {
+                        "--zookeeper", zkUtil.getZooKeeperConnectString(),
+                        "--listen", "10"});
+                return 0;
+            });
 
-        Thread.sleep(10000);
+        Thread.sleep(2000);
 
 Review comment:
   Would be very hard to without changing the ReadThroughputLatency benchmark 
completely. That's out of scope for the fix. I can remove all changes that are 
unrelated to the core problem, but this fix needs to go in ASAP. Postcommit[1] 
has been broken for 9 days now.
   
   [1] 
https://builds.apache.org/view/B/view/BookKeeper/job/bookkeeper_postcommit_master_java8/

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to