Skip to content

Commit

Permalink
Update integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentgo committed Mar 11, 2024
1 parent 5179c18 commit 191cc6e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.apache.curator.test.compatibility.CuratorTestBase;
import org.apache.curator.utils.Compatibility;
import org.apache.curator.utils.ZookeeperCompatibility;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

Expand All @@ -33,6 +34,14 @@ public void testIsZk35() {
assertFalse(Compatibility.hasGetReachableOrOneMethod());
assertTrue(Compatibility.hasAddrField());
assertFalse(Compatibility.hasPersistentWatchers());
assertFalse(ZookeeperCompatibility.LATEST.hasPersistentWatchers());
assertFalse(ZookeeperCompatibility.builder()
.build()
.hasPersistentWatchers());
assertFalse(ZookeeperCompatibility.builder()
.hasPersistentWatchers(false)
.build()
.hasPersistentWatchers());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@

package org.apache.curator.zk36;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import org.apache.curator.test.compatibility.CuratorTestBase;
import org.apache.curator.utils.Compatibility;
import org.apache.curator.utils.ZookeeperCompatibility;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

Expand All @@ -33,6 +35,14 @@ public void testIsZk36() {
assertTrue(Compatibility.hasGetReachableOrOneMethod());
assertTrue(Compatibility.hasAddrField());
assertTrue(Compatibility.hasPersistentWatchers());
assertTrue(ZookeeperCompatibility.LATEST.hasPersistentWatchers());
assertFalse(ZookeeperCompatibility.builder()
.build()
.hasPersistentWatchers());
assertFalse(ZookeeperCompatibility.builder()
.hasPersistentWatchers(false)
.build()
.hasPersistentWatchers());
try {
Class.forName("org.apache.zookeeper.proto.WhoAmIResponse");
fail("WhoAmIResponse is introduced after ZooKeeper 3.7");
Expand Down

0 comments on commit 191cc6e

Please sign in to comment.