Description: In junit5 5.3.2, the booleans() method is not available in
 the ValueSource annotation class, using ints() instead.
Author: Pierre Gruet <pgt@debian.org>
Forwarded: not-needed
Last-Update: 2022-06-16

--- a/zookeeper-server/src/test/java/org/apache/zookeeper/test/ObserverMasterTest.java
+++ b/zookeeper-server/src/test/java/org/apache/zookeeper/test/ObserverMasterTest.java
@@ -77,8 +77,9 @@
      * be elected if and only if an Observer voted.
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testObserver(boolean testObserverMaster) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testObserver(int arg) throws Exception {
+        boolean testObserverMaster = (arg == 1);
         // We expect two notifications before we want to continue
         latch = new CountDownLatch(2);
         setUp(-1, testObserverMaster);
@@ -176,8 +177,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRevalidation(boolean testObserverMaster) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRevalidation(int arg) throws Exception {
+        boolean testObserverMaster = (arg == 1);
         setUp(-1, testObserverMaster);
         q3.start();
         assertTrue(ClientBase.waitForServerUp("127.0.0.1:" + CLIENT_PORT_OBS, CONNECTION_TIMEOUT),
@@ -209,8 +211,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testInOrderCommits(boolean testObserverMaster) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testInOrderCommits(int arg) throws Exception {
+        boolean testObserverMaster = (arg == 1);
         setUp(-1, testObserverMaster);
 
         zk = new ZooKeeper("127.0.0.1:" + CLIENT_PORT_QP1, ClientBase.CONNECTION_TIMEOUT, null);
@@ -273,8 +276,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testAdminCommands(boolean testObserverMaster) throws IOException, MBeanException, InstanceNotFoundException, ReflectionException, InterruptedException, MalformedObjectNameException, AttributeNotFoundException, InvalidAttributeValueException, KeeperException {
+    @ValueSource(ints = {1, 0})
+    public void testAdminCommands(int arg) throws IOException, MBeanException, InstanceNotFoundException, ReflectionException, InterruptedException, MalformedObjectNameException, AttributeNotFoundException, InvalidAttributeValueException, KeeperException {
+        boolean testObserverMaster = (arg == 1);
         // flush all beans, then start
         for (ZKMBeanInfo beanInfo : MBeanRegistry.getInstance().getRegisteredBeans()) {
             MBeanRegistry.getInstance().unregister(beanInfo);
@@ -395,9 +399,10 @@
     // This test is known to be flaky and fail due to "reconfig already in progress".
     // TODO: Investigate intermittent testDynamicReconfig failures.
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
+    @ValueSource(ints = {1, 0})
     @Disabled
-    public void testDynamicReconfig(boolean testObserverMaster) throws InterruptedException, IOException, KeeperException {
+    public void testDynamicReconfig(int arg) throws InterruptedException, IOException, KeeperException {
+        boolean testObserverMaster = (arg == 1);
         if (!testObserverMaster) {
             return;
         }
--- a/zookeeper-server/src/test/java/org/apache/zookeeper/RemoveWatchesTest.java
+++ b/zookeeper-server/src/test/java/org/apache/zookeeper/RemoveWatchesTest.java
@@ -174,8 +174,9 @@
      * Test verifies removal of single watcher when there is server connection
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveSingleWatcher(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveSingleWatcher(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL);
         zk1.create("/node2", null, Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL);
         MyWatcher w1 = new MyWatcher("/node1", 1);
@@ -206,8 +207,9 @@
      * connection
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testMultipleDataWatchers(boolean useAsync) throws IOException, InterruptedException, KeeperException {
+    @ValueSource(ints = {1, 0})
+    public void testMultipleDataWatchers(int arg) throws IOException, InterruptedException, KeeperException {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL);
         MyWatcher w1 = new MyWatcher("/node1", 1);
         LOG.info("Adding data watcher {} on path {}", w1, "/node1");
@@ -236,8 +238,9 @@
      * connection
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testMultipleChildWatchers(boolean useAsync) throws IOException, InterruptedException, KeeperException {
+    @ValueSource(ints = {1, 0})
+    public void testMultipleChildWatchers(int arg) throws IOException, InterruptedException, KeeperException {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         MyWatcher w1 = new MyWatcher("/node1", 1);
         LOG.info("Adding child watcher {} on path {}", w1, "/node1");
@@ -271,8 +274,9 @@
      * data, child, exists
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveAllWatchers(boolean useAsync) throws IOException, InterruptedException, KeeperException {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveAllWatchers(int arg) throws IOException, InterruptedException, KeeperException {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         MyWatcher w1 = new MyWatcher("/node1", 2);
         MyWatcher w2 = new MyWatcher("/node1", 2);
@@ -296,8 +300,9 @@
      * watchers. Child watchers shouldn't be removed
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveAllDataWatchers(boolean useAsync) throws IOException, InterruptedException, KeeperException {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveAllDataWatchers(int arg) throws IOException, InterruptedException, KeeperException {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         MyWatcher w1 = new MyWatcher("/node1", 1);
         MyWatcher w2 = new MyWatcher("/node1", 1);
@@ -338,8 +343,9 @@
      * watchers. Data watchers shouldn't be removed
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveAllChildWatchers(boolean useAsync) throws IOException, InterruptedException, KeeperException {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveAllChildWatchers(int arg) throws IOException, InterruptedException, KeeperException {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         MyWatcher w1 = new MyWatcher("/node1", 1);
         MyWatcher w2 = new MyWatcher("/node1", 1);
@@ -381,8 +387,9 @@
      * <p>All other watchers shouldn't be removed.
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveAllPersistentWatchers(boolean useAsync) throws InterruptedException, KeeperException {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveAllPersistentWatchers(int arg) throws InterruptedException, KeeperException {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         BlockingDeque<WatchedEvent> persistentEvents1 = new LinkedBlockingDeque<>();
         BlockingDeque<WatchedEvent> persistentEvents2 = new LinkedBlockingDeque<>();
@@ -425,8 +432,9 @@
      * <p>All other watchers shouldn't be removed
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveAllPersistentRecursiveWatchers(boolean useAsync) throws InterruptedException, KeeperException {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveAllPersistentRecursiveWatchers(int arg) throws InterruptedException, KeeperException {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         BlockingDeque<WatchedEvent> recursiveEvents1 = new LinkedBlockingDeque<>();
         BlockingDeque<WatchedEvent> recursiveEvents2 = new LinkedBlockingDeque<>();
@@ -467,8 +475,9 @@
      * Test verifies given watcher doesn't exists!
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testNoWatcherException(boolean useAsync) throws IOException, InterruptedException, KeeperException {
+    @ValueSource(ints = {1, 0})
+    public void testNoWatcherException(int arg) throws IOException, InterruptedException, KeeperException {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         MyWatcher w1 = new MyWatcher("/node1", 2);
         MyWatcher w2 = new MyWatcher("/node1", 2);
@@ -495,8 +504,9 @@
      * function
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveAnyDataWatcher(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveAnyDataWatcher(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         MyWatcher w1 = new MyWatcher("/node1", 1);
         MyWatcher w2 = new MyWatcher("/node1", 2);
@@ -521,8 +531,9 @@
      * function
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveAnyChildWatcher(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveAnyChildWatcher(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         MyWatcher w1 = new MyWatcher("/node1", 2);
         MyWatcher w2 = new MyWatcher("/node1", 1);
@@ -546,8 +557,9 @@
      * local=true, otw should retain it
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveWatcherWhenNoConnection(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveWatcherWhenNoConnection(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         MyWatcher w1 = new MyWatcher("/node1", 2);
         MyWatcher w2 = new MyWatcher("/node1", 1);
@@ -576,8 +588,9 @@
      * datastructure 'watchManager.existWatches'
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testManyPreNodeWatchers(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testManyPreNodeWatchers(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         int count = 50;
         List<MyWatcher> wList = new ArrayList<>(count);
         MyWatcher w;
@@ -604,8 +617,9 @@
      * 'watchManager.childWatches'
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testManyChildWatchers(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testManyChildWatchers(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         int count = 50;
         List<MyWatcher> wList = new ArrayList<>(count);
         MyWatcher w;
@@ -639,8 +653,9 @@
      * 'watchManager.dataWatches'
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testManyDataWatchers(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testManyDataWatchers(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         int count = 50;
         List<MyWatcher> wList = new ArrayList<>(count);
         MyWatcher w;
@@ -670,8 +685,9 @@
      * WatcherType#Any. Also, verifies internal watchManager datastructures
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testManyWatchersWhenNoConnection(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testManyWatchersWhenNoConnection(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         int count = 3;
         List<MyWatcher> wList = new ArrayList<>(count);
         MyWatcher w;
@@ -716,8 +732,9 @@
      * Test verifies removing watcher having namespace
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testChRootRemoveWatcher(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testChRootRemoveWatcher(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         // creating the subtree for chRoot clients.
         String chRoot = "/appsX";
         zk1.create("/appsX", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
@@ -771,8 +788,9 @@
      *
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testNoWatcherServerException(boolean useAsync) throws KeeperException, InterruptedException, IOException, TimeoutException {
+    @ValueSource(ints = {1, 0})
+    public void testNoWatcherServerException(int arg) throws KeeperException, InterruptedException, IOException, TimeoutException {
+        boolean useAsync = (arg == 1);
         CountdownWatcher watcher = new CountdownWatcher();
         ZooKeeper zk = spy(new ZooKeeper(hostPort, CONNECTION_TIMEOUT, watcher));
         MyWatchManager watchManager = new MyWatchManager(false, watcher);
@@ -789,8 +807,9 @@
      * Test verifies given watcher doesn't exists!
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveAllNoWatcherException(boolean useAsync) throws IOException, InterruptedException, KeeperException {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveAllNoWatcherException(int arg) throws IOException, InterruptedException, KeeperException {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         removeAllWatches(zk2, "/node1", WatcherType.Any, false, Code.NOWATCHER, useAsync);
     }
@@ -799,8 +818,9 @@
      * Test verifies null watcher
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testNullWatcherReference(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testNullWatcherReference(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         try {
             if (useAsync) {
@@ -819,8 +839,9 @@
      * function
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveWhenMultipleDataWatchesOnAPath(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveWhenMultipleDataWatchesOnAPath(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         final CountDownLatch dataWatchCount = new CountDownLatch(1);
         final CountDownLatch rmWatchCount = new CountDownLatch(1);
@@ -853,8 +874,9 @@
      * watcher function
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveWhenMultipleChildWatchesOnAPath(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveWhenMultipleChildWatchesOnAPath(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         final CountDownLatch childWatchCount = new CountDownLatch(1);
         final CountDownLatch rmWatchCount = new CountDownLatch(1);
@@ -886,8 +908,9 @@
      * Test verifies {@link WatcherType#Persistent} - removes only the configured watcher function
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveWhenMultiplePersistentWatchesOnAPath(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveWhenMultiplePersistentWatchesOnAPath(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
 
         BlockingDeque<WatchedEvent> persistentEvents1 = new LinkedBlockingDeque<>();
@@ -909,8 +932,9 @@
      * Test verifies {@link WatcherType#PersistentRecursive} - removes only the configured watcher function
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveWhenMultiplePersistentRecursiveWatchesOnAPath(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveWhenMultiplePersistentRecursiveWatchesOnAPath(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
 
         BlockingDeque<WatchedEvent> recursiveEvents1 = new LinkedBlockingDeque<>();
@@ -932,8 +956,9 @@
      * Test verifies {@link OpCode#checkWatches} {@link WatcherType#Persistent} using {@link WatcherType#Data}.
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemovePersistentWatchesOnAPathPartially(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemovePersistentWatchesOnAPathPartially(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
 
         BlockingDeque<WatchedEvent> persistentEvents = new LinkedBlockingDeque<>();
@@ -961,8 +986,9 @@
      * <p>All other watcher types shouldn't be removed.
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveAllDataWatchesOnAPath(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveAllDataWatchesOnAPath(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
 
         BlockingDeque<WatchedEvent> dataEvents1 = new LinkedBlockingDeque<>();
@@ -1005,8 +1031,9 @@
      * <p>All other watcher types shouldn't be removed.
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveAllChildWatchesOnAPath(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveAllChildWatchesOnAPath(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
 
         BlockingDeque<WatchedEvent> childrenEvents1 = new LinkedBlockingDeque<>();
@@ -1047,8 +1074,9 @@
      * <p>All other watcher types shouldn't be removed.
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveAllPersistentWatchesOnAPath(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveAllPersistentWatchesOnAPath(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
 
         BlockingDeque<WatchedEvent> persistentEvents1 = new LinkedBlockingDeque<>();
@@ -1086,8 +1114,9 @@
      * Test verifies {@link OpCode#removeWatches} {@link WatcherType#Persistent} using {@link WatcherType#Data}.
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveAllPersistentWatchesOnAPathPartially(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveAllPersistentWatchesOnAPathPartially(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
 
         BlockingDeque<WatchedEvent> persistentEvents = new LinkedBlockingDeque<>();
@@ -1114,8 +1143,9 @@
      * <p>All other watcher types shouldn't be removed.
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveAllPersistentRecursiveWatchesOnAPath(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveAllPersistentRecursiveWatchesOnAPath(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
 
         BlockingDeque<WatchedEvent> recursiveEvents1 = new LinkedBlockingDeque<>();
@@ -1155,8 +1185,9 @@
      * <p>All watcher types should be removed.
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testRemoveAllWatchesOnAPath(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testRemoveAllWatchesOnAPath(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk1.create("/node1", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
 
         // Add multiple child watches
--- a/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/LearnerMetricsTest.java
+++ b/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/LearnerMetricsTest.java
@@ -52,8 +52,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testLearnerMetricsTest(boolean asyncSending) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testLearnerMetricsTest(int arg) throws Exception {
+        boolean asyncSending = (arg == 1);
         Learner.setAsyncSending(asyncSending);
         ServerMetrics.getMetrics().resetAll();
         ClientBase.setupTestEnv();
--- a/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/ReconfigDuringLeaderSyncTest.java
+++ b/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/ReconfigDuringLeaderSyncTest.java
@@ -81,8 +81,9 @@
      */
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testDuringLeaderSync(boolean asyncSending) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testDuringLeaderSync(int arg) throws Exception {
+        boolean asyncSending = (arg == 1);
         setup(asyncSending);
         final int[] clientPorts = new int[SERVER_COUNT + 1];
         StringBuilder sb = new StringBuilder();
--- a/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/UnifiedServerSocketModeDetectionTest.java
+++ b/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/UnifiedServerSocketModeDetectionTest.java
@@ -154,80 +154,90 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetInetAddress(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetInetAddress(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getInetAddress();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetLocalAddress(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetLocalAddress(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getLocalAddress();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetPort(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetPort(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getPort();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetLocalPort(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetLocalPort(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getLocalPort();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetRemoteSocketAddress(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetRemoteSocketAddress(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getRemoteSocketAddress();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetLocalSocketAddress(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetLocalSocketAddress(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getLocalSocketAddress();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetInputStream(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetInputStream(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getInputStream();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetOutputStream(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetOutputStream(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getOutputStream();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetTcpNoDelay(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetTcpNoDelay(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getTcpNoDelay();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testSetTcpNoDelay(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testSetTcpNoDelay(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         boolean tcpNoDelay = serverSideSocket.getTcpNoDelay();
         tcpNoDelay = !tcpNoDelay;
@@ -237,16 +247,18 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetSoLinger(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetSoLinger(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getSoLinger();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testSetSoLinger(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testSetSoLinger(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         int soLinger = serverSideSocket.getSoLinger();
         if (soLinger == -1) {
@@ -263,16 +275,18 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetSoTimeout(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetSoTimeout(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getSoTimeout();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testSetSoTimeout(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testSetSoTimeout(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         int timeout = serverSideSocket.getSoTimeout();
         timeout = timeout + 10;
@@ -282,16 +296,18 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetSendBufferSize(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetSendBufferSize(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getSendBufferSize();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testSetSendBufferSize(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testSetSendBufferSize(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.setSendBufferSize(serverSideSocket.getSendBufferSize() + 1024);
         assertFalse(serverSideSocket.isModeKnown());
@@ -302,16 +318,18 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetReceiveBufferSize(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetReceiveBufferSize(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getReceiveBufferSize();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testSetReceiveBufferSize(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testSetReceiveBufferSize(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.setReceiveBufferSize(serverSideSocket.getReceiveBufferSize() + 1024);
         assertFalse(serverSideSocket.isModeKnown());
@@ -322,16 +340,18 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetKeepAlive(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetKeepAlive(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getKeepAlive();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testSetKeepAlive(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testSetKeepAlive(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         boolean keepAlive = serverSideSocket.getKeepAlive();
         keepAlive = !keepAlive;
@@ -341,16 +361,18 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetTrafficClass(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetTrafficClass(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getTrafficClass();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testSetTrafficClass(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testSetTrafficClass(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.setTrafficClass(SocketOptions.IP_TOS);
         assertFalse(serverSideSocket.isModeKnown());
@@ -360,16 +382,18 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetReuseAddress(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetReuseAddress(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.getReuseAddress();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testSetReuseAddress(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testSetReuseAddress(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         boolean reuseAddress = serverSideSocket.getReuseAddress();
         reuseAddress = !reuseAddress;
@@ -379,56 +403,63 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testClose(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testClose(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.close();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testShutdownInput(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testShutdownInput(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.shutdownInput();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testShutdownOutput(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testShutdownOutput(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.shutdownOutput();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testIsConnected(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testIsConnected(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.isConnected();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testIsBound(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testIsBound(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.isBound();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testIsClosed(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testIsClosed(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.isClosed();
         assertFalse(serverSideSocket.isModeKnown());
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testIsInputShutdown(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testIsInputShutdown(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.isInputShutdown();
         assertFalse(serverSideSocket.isModeKnown());
@@ -437,8 +468,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testIsOutputShutdown(boolean useSecureClient) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testIsOutputShutdown(int arg) throws Exception {
+        boolean useSecureClient = (arg == 1);
         init(useSecureClient);
         serverSideSocket.isOutputShutdown();
         assertFalse(serverSideSocket.isModeKnown());
--- a/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/WatchLeakTest.java
+++ b/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/WatchLeakTest.java
@@ -81,8 +81,9 @@
      */
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testWatchesLeak(boolean sessionTimedout) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testWatchesLeak(int arg) throws Exception {
+        boolean sessionTimedout = (arg == 1);
 
         NIOServerCnxnFactory serverCnxnFactory = mock(NIOServerCnxnFactory.class);
         final SelectionKey sk = new FakeSK();
--- a/zookeeper-server/src/test/java/org/apache/zookeeper/test/MultiOperationTest.java
+++ b/zookeeper-server/src/test/java/org/apache/zookeeper/test/MultiOperationTest.java
@@ -190,8 +190,9 @@
      * Test verifies the multi calls with invalid znode path
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testInvalidPath(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testInvalidPath(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         List<Integer> expectedResultCodes = new ArrayList<>();
         expectedResultCodes.add(KeeperException.Code.RUNTIMEINCONSISTENCY.intValue());
         expectedResultCodes.add(KeeperException.Code.BADARGUMENTS.intValue());
@@ -247,8 +248,9 @@
      * 3. multi delete should succeed.
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testMultiRollback(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testMultiRollback(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk.create("/foo", new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
 
         ZooKeeper epheZk = createClient();
@@ -292,8 +294,9 @@
      * Test verifies the multi calls with blank znode path
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testBlankPath(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testBlankPath(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         List<Integer> expectedResultCodes = new ArrayList<>();
         expectedResultCodes.add(KeeperException.Code.RUNTIMEINCONSISTENCY.intValue());
         expectedResultCodes.add(KeeperException.Code.BADARGUMENTS.intValue());
@@ -314,8 +317,9 @@
      * Test verifies the multi.create with invalid createModeFlag
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testInvalidCreateModeFlag(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testInvalidCreateModeFlag(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         List<Integer> expectedResultCodes = new ArrayList<>();
         expectedResultCodes.add(KeeperException.Code.RUNTIMEINCONSISTENCY.intValue());
         expectedResultCodes.add(KeeperException.Code.BADARGUMENTS.intValue());
@@ -331,8 +335,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testChRootCreateDelete(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testChRootCreateDelete(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         // creating the subtree for chRoot clients.
         String chRoot = createNameSpace(useAsync);
         // Creating child using chRoot client.
@@ -352,8 +357,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testChRootSetData(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testChRootSetData(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         // creating the subtree for chRoot clients.
         String chRoot = createNameSpace(useAsync);
         // setData using chRoot client.
@@ -374,8 +380,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testChRootCheck(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testChRootCheck(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         // creating the subtree for chRoot clients.
         String chRoot = createNameSpace(useAsync);
         // checking the child version using chRoot client.
@@ -393,8 +400,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testChRootTransaction(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testChRootTransaction(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         // creating the subtree for chRoot clients.
         String chRoot = createNameSpace(useAsync);
         // checking the child version using chRoot client.
@@ -429,8 +437,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testCreate(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testCreate(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         multi(zk, Arrays.asList(
                 Op.create("/multi0", new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT),
                 Op.create("/multi1", new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT),
@@ -442,8 +451,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testCreate2(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testCreate2(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         CreateOptions options = CreateOptions.newBuilder(Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT).build();
         List<Op> ops = Arrays.asList(
             Op.create("/multi0", new byte[0], options),
@@ -464,14 +474,16 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testEmpty(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testEmpty(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         multi(zk, Arrays.asList(), useAsync);
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testCreateDelete(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testCreateDelete(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         multi(zk, Arrays.asList(
                 Op.create("/multi", new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT),
                 Op.delete("/multi", 0)),
@@ -482,8 +494,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testInvalidVersion(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testInvalidVersion(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
 
         try {
             multi(zk, Arrays.asList(
@@ -497,8 +510,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testNestedCreate(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testNestedCreate(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
 
         multi(zk, Arrays.asList(
                 /* Create */
@@ -515,8 +529,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testSetData(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testSetData(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
 
         String[] names = {"/multi0", "/multi1", "/multi2"};
         List<Op> ops = new ArrayList<>();
@@ -534,8 +549,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testUpdateConflict(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testUpdateConflict(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
 
         assertNull(zk.exists("/multi", null));
 
@@ -564,8 +580,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testDeleteUpdateConflict(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testDeleteUpdateConflict(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
 
         /* Delete of a node folowed by an update of the (now) deleted node */
         try {
@@ -584,8 +601,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testGetResults(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testGetResults(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         /* Delete of a node folowed by an update of the (now) deleted node */
         Iterable<Op> ops = Arrays.asList(
                 Op.create("/multi", new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT),
@@ -640,8 +658,9 @@
      * Exercise the equals methods of OpResult classes.
      */
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testOpResultEquals(boolean useAsync) {
+    @ValueSource(ints = {1, 0})
+    public void testOpResultEquals(int arg) {
+        boolean useAsync = (arg == 1);
         opEquals(new CreateResult("/foo"), new CreateResult("/foo"), new CreateResult("nope"));
 
         opEquals(new CreateResult("/foo"), new CreateResult("/foo"), new CreateResult("/foo", new Stat(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)));
@@ -670,8 +689,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testWatchesTriggered(boolean useAsync) throws KeeperException, InterruptedException {
+    @ValueSource(ints = {1, 0})
+    public void testWatchesTriggered(int arg) throws KeeperException, InterruptedException {
+        boolean useAsync = (arg == 1);
         HasTriggeredWatcher watcher = new HasTriggeredWatcher();
         zk.getChildren("/", watcher);
         multi(zk, Arrays.asList(
@@ -682,8 +702,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testNoWatchesTriggeredForFailedMultiRequest(boolean useAsync) throws InterruptedException, KeeperException {
+    @ValueSource(ints = {1, 0})
+    public void testNoWatchesTriggeredForFailedMultiRequest(int arg) throws InterruptedException, KeeperException {
+        boolean useAsync = (arg == 1);
         HasTriggeredWatcher watcher = new HasTriggeredWatcher();
         zk.getChildren("/", watcher);
         try {
@@ -704,8 +725,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testTransactionBuilder(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testTransactionBuilder(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         List<OpResult> results = commit(
                 zk.transaction()
                         .create("/t1", new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT)
@@ -763,8 +785,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testMultiGetChildren(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testMultiGetChildren(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         List<String> topLevelNodes = new ArrayList<>();
         Map<String, List<String>> childrenNodes = new HashMap<>();
         // Creating a database where '/fooX' nodes has 'barXY' named children.
@@ -795,8 +818,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testMultiGetChildrenSameNode(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testMultiGetChildrenSameNode(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         List<String> childrenNodes = new ArrayList<>();
         // Creating a database where '/foo' node has 'barX' named children.
         String topLevelNode = "/foo";
@@ -824,8 +848,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testMultiGetChildrenAuthentication(boolean useAsync) throws KeeperException, InterruptedException {
+    @ValueSource(ints = {1, 0})
+    public void testMultiGetChildrenAuthentication(int arg) throws KeeperException, InterruptedException {
+        boolean useAsync = (arg == 1);
         List<ACL> writeOnly = Collections.singletonList(new ACL(ZooDefs.Perms.WRITE, new Id("world", "anyone")));
         zk.create("/foo_auth", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         zk.create("/foo_auth/bar", null, Ids.READ_ACL_UNSAFE, CreateMode.PERSISTENT);
@@ -850,8 +875,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testMultiGetChildrenMixedAuthenticationErrorFirst(boolean useAsync) throws KeeperException, InterruptedException {
+    @ValueSource(ints = {1, 0})
+    public void testMultiGetChildrenMixedAuthenticationErrorFirst(int arg) throws KeeperException, InterruptedException {
+        boolean useAsync = (arg == 1);
         List<ACL> writeOnly = Collections.singletonList(new ACL(ZooDefs.Perms.WRITE, new Id("world", "anyone")));
         zk.create("/foo_auth", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         zk.create("/foo_auth/bar", null, Ids.READ_ACL_UNSAFE, CreateMode.PERSISTENT);
@@ -873,8 +899,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testMultiGetChildrenMixedAuthenticationCorrectFirst(boolean useAsync) throws KeeperException, InterruptedException {
+    @ValueSource(ints = {1, 0})
+    public void testMultiGetChildrenMixedAuthenticationCorrectFirst(int arg) throws KeeperException, InterruptedException {
+        boolean useAsync = (arg == 1);
         List<ACL> writeOnly = Collections.singletonList(new ACL(ZooDefs.Perms.WRITE, new Id("world", "anyone")));
         zk.create("/foo_auth", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         zk.create("/foo_auth/bar", null, Ids.READ_ACL_UNSAFE, CreateMode.PERSISTENT);
@@ -897,8 +924,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testMultiGetData(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testMultiGetData(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk.create("/node1", "data1".getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         zk.create("/node2", "data2".getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
 
@@ -909,8 +937,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testMultiRead(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testMultiRead(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk.create("/node1", "data1".getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         zk.create("/node2", "data2".getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL);
         zk.create("/node1/node1", "data11".getBytes(), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
@@ -957,8 +986,9 @@
     }
 
     @ParameterizedTest
-    @ValueSource(booleans = {true, false})
-    public void testMixedReadAndTransaction(boolean useAsync) throws Exception {
+    @ValueSource(ints = {1, 0})
+    public void testMixedReadAndTransaction(int arg) throws Exception {
+        boolean useAsync = (arg == 1);
         zk.create("/node", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         try {
             List<OpResult> multiRead = multi(zk, Arrays.asList(
--- a/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/QuorumSSLTest.java
+++ b/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/QuorumSSLTest.java
@@ -125,13 +125,13 @@
 
     @Retention(RetentionPolicy.RUNTIME)
     @ParameterizedTest(name = "fipsEnabled = {0}")
-    @ValueSource(booleans = { false, true})
+    @ValueSource(ints = { 0, 1})
     private @interface TestBothFipsModes {
     }
 
     @Retention(RetentionPolicy.RUNTIME)
     @ParameterizedTest(name = "fipsEnabled = {0}")
-    @ValueSource(booleans = { false })
+    @ValueSource(ints = { 0 })
     private @interface TestNoFipsOnly {
     }
 
