This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 7b52db2  Fix flake in TestPerChannelBookieClient
7b52db2 is described below

commit 7b52db2fb58ac592b54a610b8afb0c9b42184386
Author: Ivan Kelly <[email protected]>
AuthorDate: Tue Dec 5 16:46:30 2017 -0800

    Fix flake in TestPerChannelBookieClient
    
    Flake is in testRequestCompletesAfterDisconnectRace. It tests a race
    between disconnection and making a request. The flake occurred because
    when the disconnection happened, the request would be errorred out,
    and this would add a callback to the ordered executor. The test was
    shutting down the executor before the callback was actually run (it
    may not even have been added in some cases), and this was causing the
    request to never complete, failing the test.
    
    The fix is to move the shutdown of the executor to after the assertion
    that the request has completed.
    
    Author: Ivan Kelly <[email protected]>
    
    Reviewers: Sijie Guo <[email protected]>
    
    This closes #816 from ivankelly/pcbc-flake
---
 .../java/org/apache/bookkeeper/proto/TestPerChannelBookieClient.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestPerChannelBookieClient.java
 
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestPerChannelBookieClient.java
index 78c86b2..af80c14 100644
--- 
a/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestPerChannelBookieClient.java
+++ 
b/bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestPerChannelBookieClient.java
@@ -282,9 +282,10 @@ public class TestPerChannelBookieClient extends 
BookKeeperClusterTestCase {
         Thread.sleep(1000);
         client.disconnect();
         client.close();
-        eventLoopGroup.shutdownGracefully();
-        executor.shutdown();
 
         assertTrue("Request should have completed", completion.await(5, 
TimeUnit.SECONDS));
+
+        eventLoopGroup.shutdownGracefully();
+        executor.shutdown();
     }
 }

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to