You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by sy...@apache.org on 2020/06/30 15:01:44 UTC

[zookeeper] branch master updated: ZOOKEEPER-3852: Upgrade jUnit in ZooKeeper-Jute

This is an automated email from the ASF dual-hosted git repository.

symat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 6ab1822  ZOOKEEPER-3852: Upgrade jUnit in ZooKeeper-Jute
6ab1822 is described below

commit 6ab1822ec431bb3309021c1ddc613a5eaa28d83b
Author: Tamas Penzes <ta...@cloudera.com>
AuthorDate: Tue Jun 30 15:01:07 2020 +0000

    ZOOKEEPER-3852: Upgrade jUnit in ZooKeeper-Jute
    
    Sub-task of ZOOKEEPER-3732, updating jUnit to 5.6.2 in zookeeper-it sub-component.
    
    Change-Id: I495a1516c07bc597558719030a0d585bc7d4f7eb
    
    Author: Tamas Penzes <ta...@cloudera.com>
    
    Reviewers: Enrico Olivelli <eo...@apache.org>, Norbert Kalmar <nk...@apache.org>, Mate Szalay-Beko <sy...@apache.org>
    
    Closes #1386 from tamaashu/ZOOKEEPER-3852
---
 zookeeper-jute/pom.xml                               |  4 ++--
 .../java/org/apache/jute/BinaryInputArchiveTest.java | 20 ++++++++++----------
 .../java/org/apache/jute/TestCheckWriterReader.java  |  2 +-
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/zookeeper-jute/pom.xml b/zookeeper-jute/pom.xml
index 770282e..74eedb8 100755
--- a/zookeeper-jute/pom.xml
+++ b/zookeeper-jute/pom.xml
@@ -37,8 +37,8 @@
       <artifactId>audience-annotations</artifactId>
     </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>
diff --git a/zookeeper-jute/src/test/java/org/apache/jute/BinaryInputArchiveTest.java b/zookeeper-jute/src/test/java/org/apache/jute/BinaryInputArchiveTest.java
index fe9124c..9a1c70e 100644
--- a/zookeeper-jute/src/test/java/org/apache/jute/BinaryInputArchiveTest.java
+++ b/zookeeper-jute/src/test/java/org/apache/jute/BinaryInputArchiveTest.java
@@ -18,17 +18,17 @@
 
 package org.apache.jute;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 import java.io.ByteArrayInputStream;
 import java.io.DataInputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.nio.charset.StandardCharsets;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 // TODO: introduce JuteTestCase as in ZKTestCase
 
@@ -47,8 +47,8 @@ public class BinaryInputArchiveTest {
             ia.readString("");
             fail("Should have thrown an IOException");
         } catch (IOException e) {
-            assertTrue("Not 'Unreasonable length' exception: " + e,
-                    e.getMessage().startsWith(BinaryInputArchive.UNREASONBLE_LENGTH));
+            assertTrue(e.getMessage().startsWith(BinaryInputArchive.UNREASONBLE_LENGTH),
+                    () -> "Not 'Unreasonable length' exception: " + e);
         }
     }
 
@@ -155,8 +155,8 @@ public class BinaryInputArchiveTest {
       ia.readString("");
       fail("Should have thrown an IOException");
     } catch (IOException e) {
-      assertTrue("Not 'Unreasonable length' exception: " + e,
-          e.getMessage().startsWith(BinaryInputArchive.UNREASONBLE_LENGTH));
+      assertTrue(e.getMessage().startsWith(BinaryInputArchive.UNREASONBLE_LENGTH),
+              () -> "Not 'Unreasonable length' exception: " + e);
     }
   }
 
diff --git a/zookeeper-jute/src/test/java/org/apache/jute/TestCheckWriterReader.java b/zookeeper-jute/src/test/java/org/apache/jute/TestCheckWriterReader.java
index 81067ce..9ae70fc 100644
--- a/zookeeper-jute/src/test/java/org/apache/jute/TestCheckWriterReader.java
+++ b/zookeeper-jute/src/test/java/org/apache/jute/TestCheckWriterReader.java
@@ -18,7 +18,7 @@
 
 package org.apache.jute;
 
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.fail;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;