|
@@ -38,6 +38,7 @@ import org.apache.zookeeper.Watcher.Event.EventType;
|
|
|
import org.apache.zookeeper.ZooDefs.Ids;
|
|
|
import org.apache.zookeeper.data.Stat;
|
|
|
import org.junit.Assert;
|
|
|
+import org.junit.Before;
|
|
|
import org.junit.Test;
|
|
|
|
|
|
public class WatcherTest extends ClientBase {
|
|
@@ -67,6 +68,14 @@ public class WatcherTest extends ClientBase {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Before
|
|
|
+ public void setUp() throws Exception {
|
|
|
+ super.setUp();
|
|
|
+ // Reset to default value since some test cases set this to true.
|
|
|
+ // Needed for JDK7 since unit test can run is random order
|
|
|
+ ClientCnxn.setDisableAutoResetWatch(false);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Verify that we get all of the events we expect to get. This particular
|
|
|
* case verifies that we see all of the data events on a particular node.
|