Skip to content

Commit 19fd7ae

Browse files
TEZ-4719: Move to Junit6
1 parent 17d1549 commit 19fd7ae

267 files changed

Lines changed: 10392 additions & 8488 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codespellrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
[codespell]
21+
ignore-words-list = thirdparty,afterall,AfterAll

hadoop-shim/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
<artifactId>slf4j-api</artifactId>
3535
</dependency>
3636
<dependency>
37-
<groupId>junit</groupId>
38-
<artifactId>junit</artifactId>
37+
<groupId>org.junit.jupiter</groupId>
38+
<artifactId>junit-jupiter</artifactId>
3939
</dependency>
4040
<dependency>
4141
<groupId>org.apache.hadoop</groupId>

hadoop-shim/src/test/java/org/apache/tez/hadoop/shim/TestHadoopShimsLoader.java

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,24 @@
1818
*/
1919
package org.apache.tez.hadoop.shim;
2020

21+
import static org.junit.jupiter.api.Assertions.assertEquals;
22+
import static org.junit.jupiter.api.Assertions.assertNotNull;
23+
import static org.junit.jupiter.api.Assertions.assertThrows;
24+
2125
import org.apache.hadoop.conf.Configuration;
2226
import org.apache.tez.hadoop.shim.DummyShimProvider.DummyShim;
2327

24-
import org.junit.Assert;
25-
import org.junit.Test;
28+
import org.junit.jupiter.api.Test;
29+
2630

2731
public class TestHadoopShimsLoader {
2832

2933
@Test
3034
public void testBasicLoader() {
3135
HadoopShimsLoader loader = new HadoopShimsLoader(new Configuration(false));
3236
HadoopShim shim = loader.getHadoopShim();
33-
Assert.assertNotNull(shim);
34-
Assert.assertEquals(DefaultHadoopShim.class, shim.getClass());
37+
assertNotNull(shim);
38+
assertEquals(DefaultHadoopShim.class, shim.getClass());
3539
}
3640

3741
@Test
@@ -40,16 +44,19 @@ public void testLoaderOverride() {
4044
conf.set(HadoopShimsLoader.TEZ_HADOOP_SHIM_PROVIDER_CLASS, DummyShimProvider.class.getName());
4145
HadoopShimsLoader loader = new HadoopShimsLoader(conf, true);
4246
HadoopShim shim = loader.getHadoopShim();
43-
Assert.assertNotNull(shim);
44-
Assert.assertEquals(DummyShim.class, shim.getClass());
47+
assertNotNull(shim);
48+
assertEquals(DummyShim.class, shim.getClass());
4549
}
4650

47-
@Test(expected = RuntimeException.class)
51+
@Test
4852
public void testInvalidOverride() {
4953
Configuration conf = new Configuration(false);
5054
conf.set(HadoopShimsLoader.TEZ_HADOOP_SHIM_PROVIDER_CLASS, "org.apache.tez.foo");
51-
HadoopShimsLoader loader = new HadoopShimsLoader(conf, true);
52-
HadoopShim shim = loader.getHadoopShim();
55+
assertThrows(
56+
RuntimeException.class,
57+
() -> {
58+
HadoopShimsLoader loader = new HadoopShimsLoader(conf, true);
59+
HadoopShim shim = loader.getHadoopShim();
60+
});
5361
}
54-
5562
}

pom.xml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@
8585
<jackson.version>2.18.6</jackson.version>
8686
<jersey.version>2.46</jersey.version>
8787
<jettison.version>1.5.4</jettison.version>
88-
<junit.version>4.13.2</junit.version>
89-
<junit.jupiter.version>5.9.3</junit.jupiter.version>
88+
<junit.version>6.1.0</junit.version>
9089
<leveldbjni.group>org.fusesource.leveldbjni</leveldbjni.group>
9190
<leveldb.version>0.12</leveldb.version>
9291
<leveldbjni-all.version>1.8</leveldbjni-all.version>
@@ -629,8 +628,8 @@
629628
<version>${hadoop.version}</version>
630629
<exclusions>
631630
<exclusion>
632-
<groupId>junit</groupId>
633-
<artifactId>junit</artifactId>
631+
<groupId>org.junit.jupiter</groupId>
632+
<artifactId>junit-jupiter</artifactId>
634633
</exclusion>
635634
<exclusion>
636635
<groupId>com.google.inject</groupId>
@@ -890,22 +889,10 @@
890889
<artifactId>commons-cli</artifactId>
891890
<version>${commons-cli.version}</version>
892891
</dependency>
893-
<dependency>
894-
<groupId>junit</groupId>
895-
<artifactId>junit</artifactId>
896-
<version>${junit.version}</version>
897-
<scope>test</scope>
898-
</dependency>
899892
<dependency>
900893
<groupId>org.junit.jupiter</groupId>
901-
<artifactId>junit-jupiter-api</artifactId>
902-
<version>${junit.jupiter.version}</version>
903-
<scope>test</scope>
904-
</dependency>
905-
<dependency>
906-
<groupId>org.junit.vintage</groupId>
907-
<artifactId>junit-vintage-engine</artifactId>
908-
<version>${junit.jupiter.version}</version>
894+
<artifactId>junit-jupiter</artifactId>
895+
<version>${junit.version}</version>
909896
<scope>test</scope>
910897
</dependency>
911898
<dependency>

tez-api/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@
9090
<artifactId>protobuf-java</artifactId>
9191
</dependency>
9292
<dependency>
93-
<groupId>junit</groupId>
94-
<artifactId>junit</artifactId>
93+
<groupId>org.junit.jupiter</groupId>
94+
<artifactId>junit-jupiter</artifactId>
9595
</dependency>
9696
<dependency>
9797
<groupId>org.glassfish.jersey.core</groupId>

0 commit comments

Comments
 (0)