فهرست منبع

ZOOKEEPER-3862: Re-enable deprecation check after finishing jUnit upg…

…rade

Last changes on sub-components which need to be build every time and re-enable deprecation check for the builds.

Change-Id: Iebf83d7727d9d7535b367613d262800ad6331fa7

Author: Tamas Penzes <tamaas@cloudera.com>

Reviewers: eolivelli@apache.org, andor@apache.org

Closes #1424 from tamaashu/ZOOKEEPER-3862
Tamas Penzes 4 سال پیش
والد
کامیت
0b386e4579

+ 1 - 0
pom.xml

@@ -665,6 +665,7 @@
              <showWarnings>true</showWarnings>
              <compilerArgs>
                <compilerArg>-Werror</compilerArg>
+               <compilerArg>-Xlint:deprecation</compilerArg>
                <compilerArg>-Xlint:unchecked</compilerArg>
                <compilerArg>-Xlint:-options</compilerArg>
                <compilerArg>-Xdoclint:-missing</compilerArg>

+ 2 - 2
zookeeper-compatibility-tests/zookeeper-compatibility-tests-curator/pom.xml

@@ -71,8 +71,8 @@
         </dependency>
 
         <dependency>
-            <groupId>org.junit.vintage</groupId>
-            <artifactId>junit-vintage-engine</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>

+ 4 - 4
zookeeper-compatibility-tests/zookeeper-compatibility-tests-curator/src/test/java/org/apache/zookeeper/compatibility/TestApacheCuratorCompatibility.java

@@ -18,8 +18,8 @@
 
 package org.apache.zookeeper.compatibility;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.TimeUnit;
@@ -28,7 +28,7 @@ import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.framework.recipes.cache.CuratorCache;
 import org.apache.curator.retry.RetryOneTime;
 import org.apache.curator.test.TestingServer;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 /**
  * Make sure minimal Apache Curator APIs work correctly. As it's a widely used ZooKeeper
@@ -67,7 +67,7 @@ public class TestApacheCuratorCompatibility {
     private static String poll(BlockingQueue<String> queue) {
         try {
             String value = queue.poll(TIMEOUT_MS, TimeUnit.MILLISECONDS);
-            assertNotNull("Event poll timed out", value);
+            assertNotNull(value, "Event poll timed out");
             return value;
         } catch (InterruptedException e) {
             Thread.currentThread().interrupt();

+ 0 - 0
zookeeper-server/src/test/java/org/apache/zookeeper/JUnit4ZKTestRunner.java → zookeeper-contrib/zookeeper-contrib-rest/src/test/java/org/apache/zookeeper/JUnit4ZKTestRunner.java


+ 0 - 5
zookeeper-server/pom.xml

@@ -151,11 +151,6 @@
       <artifactId>jmockit</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.junit.vintage</groupId>
-      <artifactId>junit-vintage-engine</artifactId>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.junit.jupiter</groupId>
       <artifactId>junit-jupiter-api</artifactId>