anmolnar commented on a change in pull request #1233: ZOOKEEPER-3701 Split 
brain on log disk full
URL: https://github.com/apache/zookeeper/pull/1233#discussion_r370037499
 
 

 ##########
 File path: 
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/LearnerTest.java
 ##########
 @@ -300,4 +307,52 @@ public void syncTest() throws Exception {
         }
     }
 
+    @Test
+    public void truncFailTest() throws Exception {
+        final boolean[] exitProcCalled = {false};
+
+        ServiceUtils.setSystemExitProcedure(new Consumer<Integer>() {
+            @Override
+            public void accept(Integer exitCode) {
+                exitProcCalled[0] = true;
+                assertThat(exitCode, 
equalTo(ExitCode.QUORUM_PACKET_ERROR.getValue()));
 
 Review comment:
   I double checked it. Consumer's accept() method is called synchronously, no 
threading involved. In other words it will be called on junit's main thread.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to