You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2021/08/02 01:55:33 UTC

[orc] branch main updated: ORC-893: Remove junit-vintage-engine from shims module (#801)

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

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/main by this push:
     new 33418dd  ORC-893: Remove junit-vintage-engine from shims module (#801)
33418dd is described below

commit 33418dd48ebc5fdb5ac523ab8246a743424d9f5b
Author: William Hyun <wi...@apache.org>
AuthorDate: Sun Aug 1 18:55:30 2021 -0700

    ORC-893: Remove junit-vintage-engine from shims module (#801)
    
    ### What changes were proposed in this pull request?
    This PR aims to remove junit-vintage-engine from shims module.
    
    ### Why are the changes needed?
    This will complete the migration to JUnit 5 in `shims` module.
    
    ### How was this patch tested?
    Pass the CIs.
---
 java/shims/pom.xml                                      |  5 -----
 .../test/org/apache/orc/impl/TestHadoopShimsPre2_7.java | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/java/shims/pom.xml b/java/shims/pom.xml
index a12a9bf..ca6a789 100644
--- a/java/shims/pom.xml
+++ b/java/shims/pom.xml
@@ -59,11 +59,6 @@
       <artifactId>junit-jupiter-engine</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.junit.vintage</groupId>
-      <artifactId>junit-vintage-engine</artifactId>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
 
   <build>
diff --git a/java/shims/src/test/org/apache/orc/impl/TestHadoopShimsPre2_7.java b/java/shims/src/test/org/apache/orc/impl/TestHadoopShimsPre2_7.java
index c440522..646df82 100644
--- a/java/shims/src/test/org/apache/orc/impl/TestHadoopShimsPre2_7.java
+++ b/java/shims/src/test/org/apache/orc/impl/TestHadoopShimsPre2_7.java
@@ -21,21 +21,24 @@ package org.apache.orc.impl;
 import org.apache.hadoop.crypto.key.KeyProvider;
 import org.apache.hadoop.crypto.key.kms.KMSClientProvider;
 import org.apache.orc.EncryptionAlgorithm;
-import org.junit.Test;
 
 import java.sql.Date;
 import java.util.HashMap;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import org.junit.jupiter.api.Test;
 
 public class TestHadoopShimsPre2_7 {
 
-  @Test(expected = IllegalArgumentException.class)
+  @Test
   public void testFindingUnknownEncryption() {
-    KeyProvider.Metadata meta = new KMSClientProvider.KMSMetadata(
-        "XXX/CTR/NoPadding", 128, "", new HashMap<String, String>(),
-        new Date(0), 1);
-    HadoopShimsPre2_7.findAlgorithm(meta);
+    assertThrows(IllegalArgumentException.class, () -> {
+      KeyProvider.Metadata meta = new KMSClientProvider.KMSMetadata(
+          "XXX/CTR/NoPadding", 128, "", new HashMap<String, String>(),
+          new Date(0), 1);
+      HadoopShimsPre2_7.findAlgorithm(meta);
+    });
   }
 
   @Test