You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/07/23 11:17:32 UTC

[GitHub] [zookeeper] symat commented on a change in pull request #1407: ZOOKEEPER-3895 Client side NullPointerException in case of empty Multi operation

symat commented on a change in pull request #1407:
URL: https://github.com/apache/zookeeper/pull/1407#discussion_r459373303



##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java
##########
@@ -469,6 +470,16 @@ private static String makeThreadName(String suffix) {
         return name + suffix;
     }
 
+    /**
+     * Tests that current thread is the main event loop.
+     * This method is useful only for tests inside ZooKeeper project
+     * it is not a public API intended for use by external applications.
+     * @return true if Thread.currentThread() is an EventThread.
+     */
+    public static boolean isInEventThread() {

Review comment:
       just an idea: what about making it package private, and moving the testcase (or the whole test file) to the org.apache.zookeeper package?




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