Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
Problem
maven build fails on branch-3.6 because a commit that uses jUnit 5 was back ported to branch-3.6.
Affected version: branch-3.6
Fix Version: branch-3.6
How to reproduce
checkout branch 3.6 and run maven build
Error message:
[INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[22,36] package org.junit.jupiter.api does not exist [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[22,1] static import only from classes and interfaces [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[23,36] package org.junit.jupiter.api does not exist [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[23,1] static import only from classes and interfaces [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[24,36] package org.junit.jupiter.api does not exist [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[24,1] static import only from classes and interfaces [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[25,36] package org.junit.jupiter.api does not exist [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[25,1] static import only from classes and interfaces [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[42,29] package org.junit.jupiter.api does not exist [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[43,29] package org.junit.jupiter.api does not exist [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[44,29] package org.junit.jupiter.api does not exist [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[51,6] cannot find symbol symbol: class Test location: class org.apache.zookeeper.server.quorum.DIFFSyncConsistencyTest [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[52,6] cannot find symbol symbol: class Timeout location: class org.apache.zookeeper.server.quorum.DIFFSyncConsistencyTest [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[220,6] cannot find symbol symbol: class AfterEach location: class org.apache.zookeeper.server.quorum.DIFFSyncConsistencyTest [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[78,13] cannot find symbol symbol: method assertTrue(boolean,java.lang.String) location: class org.apache.zookeeper.server.quorum.DIFFSyncConsistencyTest [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[108,13] cannot find symbol symbol: method fail(java.lang.String) location: class org.apache.zookeeper.server.quorum.DIFFSyncConsistencyTest [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[113,9] cannot find symbol symbol: method assertTrue(boolean) location: class org.apache.zookeeper.server.quorum.DIFFSyncConsistencyTest [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[116,9] cannot find symbol symbol: method assertNotNull(org.apache.zookeeper.server.quorum.Leader.Proposal,java.lang.String) location: class org.apache.zookeeper.server.quorum.DIFFSyncConsistencyTest [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[123,17] cannot find symbol symbol: method fail(java.lang.String) location: class org.apache.zookeeper.server.quorum.DIFFSyncConsistencyTest [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[144,21] cannot find symbol symbol: method fail(java.lang.String) location: class org.apache.zookeeper.server.quorum.DIFFSyncConsistencyTest [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[164,17] cannot find symbol symbol: method assertNotNull(org.apache.zookeeper.data.Stat,java.lang.String) location: class org.apache.zookeeper.server.quorum.DIFFSyncConsistencyTest [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[190,21] cannot find symbol symbol: method fail(java.lang.String) location: class org.apache.zookeeper.server.quorum.DIFFSyncConsistencyTest [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[200,9] cannot find symbol symbol: method assertNotEquals(int,int,java.lang.String) location: class org.apache.zookeeper.server.quorum.DIFFSyncConsistencyTest [ERROR] /Users/myname/Projects/zookeeper/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/DIFFSyncConsistencyTest.java:[213,13] cannot find symbol symbol: method assertNotNull(org.apache.zookeeper.data.Stat,java.lang.String) location: class org.apache.zookeeper.server.quorum.DIFFSyncConsistencyTest [INFO] 24 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Apache ZooKeeper 3.6.3-SNAPSHOT: [INFO] [INFO] Apache ZooKeeper ................................... SUCCESS [ 2.449 s] [INFO] Apache ZooKeeper - Documentation ................... SUCCESS [ 1.110 s] [INFO] Apache ZooKeeper - Jute ............................ SUCCESS [ 5.511 s] [INFO] Apache ZooKeeper - Server .......................... FAILURE [ 4.667 s] [INFO] Apache ZooKeeper - Metrics Providers ............... SKIPPED [INFO] Apache ZooKeeper - Prometheus.io Metrics Provider .. SKIPPED [INFO] Apache ZooKeeper - Client .......................... SKIPPED [INFO] Apache ZooKeeper - Recipes ......................... SKIPPED [INFO] Apache ZooKeeper - Recipes - Election .............. SKIPPED [INFO] Apache ZooKeeper - Recipes - Lock .................. SKIPPED [INFO] Apache ZooKeeper - Recipes - Queue ................. SKIPPED [INFO] Apache ZooKeeper - Assembly ........................ SKIPPED [INFO] Apache ZooKeeper - Compatibility Tests ............. SKIPPED [INFO] Apache ZooKeeper - Compatibility Tests - Curator ... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13.916 s [INFO] Finished at: 2020-11-20T14:06:50-08:00 [INFO] ------------------------------------------------------------------------
Solution
As discussed in https://github.com/apache/zookeeper/pull/1445, since cherry-picking jUnit 5 upgrades and there won't be too many back ports to 3.6 afterwards, we can just fix the issue by using jUnit 4 in the test.
Attachments
Issue Links
- is duplicated by
-
ZOOKEEPER-4008 "package org.junit.jupiter.api does not exist" compilation error in Branch 3.6
- Resolved
- is related to
-
ZOOKEEPER-4008 "package org.junit.jupiter.api does not exist" compilation error in Branch 3.6
- Resolved
- links to