org.assertj
assertj-core
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/diskbalancer/DiskBalancerResultVerifier.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/diskbalancer/DiskBalancerResultVerifier.java
deleted file mode 100644
index 22367ee2fa97a..0000000000000
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/diskbalancer/DiskBalancerResultVerifier.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.hadoop.hdfs.server.diskbalancer;
-
-import org.hamcrest.Description;
-import org.hamcrest.TypeSafeMatcher;
-
-/**
- * Helps in verifying test results.
- */
-public class DiskBalancerResultVerifier
- extends TypeSafeMatcher {
- private final DiskBalancerException.Result expectedResult;
-
- DiskBalancerResultVerifier(DiskBalancerException.Result expectedResult) {
- this.expectedResult = expectedResult;
- }
-
- @Override
- protected boolean matchesSafely(DiskBalancerException exception) {
- return (this.expectedResult == exception.getResult());
- }
-
- @Override
- public void describeTo(Description description) {
- description.appendText("expects Result: ")
- .appendValue(this.expectedResult);
-
- }
-}
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestHAFsck.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestHAFsck.java
index 97f9bd4566bc0..4161beed20ae5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestHAFsck.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestHAFsck.java
@@ -22,8 +22,9 @@
import java.util.Arrays;
import org.junit.jupiter.api.Test;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameter;
+import org.junit.jupiter.params.Parameter;
+import org.junit.jupiter.params.ParameterizedClass;
+import org.junit.jupiter.params.provider.MethodSource;
import org.slf4j.event.Level;
import org.apache.hadoop.conf.Configuration;
@@ -39,20 +40,21 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
+@ParameterizedClass(name = "ProxyProvider: {0}")
+@MethodSource("data")
public class TestHAFsck {
static {
GenericTestUtils.setLogLevel(DFSUtil.LOG, Level.TRACE);
}
- @Parameter
+ @Parameter(0)
private String proxyProvider;
public String getProxyProvider() {
return proxyProvider;
}
- @Parameterized.Parameters(name = "ProxyProvider: {0}")
public static Iterable
+