Skip to content

Commit 3441e36

Browse files
committed
HADOOP-19423. Fix CheckStyle Issue.
1 parent 15a1ff7 commit 3441e36

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

hadoop-tools/hadoop-archives/src/test/java/org/apache/hadoop/tools/TestHadoopArchives.java

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,16 @@
4747
import org.apache.hadoop.util.ToolRunner;
4848
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration;
4949
import org.junit.jupiter.api.AfterEach;
50-
import org.junit.jupiter.api.Assertions;
51-
import static org.junit.jupiter.api.Assertions.*;
52-
import static org.slf4j.LoggerFactory.getLogger;
53-
import static org.assertj.core.api.Assertions.assertThat;
54-
5550
import org.junit.jupiter.api.BeforeEach;
5651
import org.junit.jupiter.api.Test;
5752
import org.slf4j.event.Level;
5853

54+
import static org.assertj.core.api.Assertions.assertThat;
55+
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
56+
import static org.junit.jupiter.api.Assertions.assertEquals;
57+
import static org.junit.jupiter.api.Assertions.assertTrue;
58+
import static org.slf4j.LoggerFactory.getLogger;
59+
5960
/**
6061
* test {@link HadoopArchives}
6162
*/
@@ -155,7 +156,7 @@ public void testRelativePath() throws Exception {
155156

156157
// compare results:
157158
final List<String> harPaths = lsr(shell, fullHarPathStr);
158-
Assertions.assertEquals(originalPaths, harPaths);
159+
assertEquals(originalPaths, harPaths);
159160
}
160161

161162
@Test
@@ -173,7 +174,7 @@ public void testRelativePathWitRepl() throws Exception {
173174

174175
// compare results:
175176
final List<String> harPaths = lsr(shell, fullHarPathStr);
176-
Assertions.assertEquals(originalPaths, harPaths);
177+
assertEquals(originalPaths, harPaths);
177178
}
178179

179180
@Test
@@ -194,10 +195,10 @@ public void testOutputPathValidity() throws Exception {
194195
createFile(archivePath, fs, harName);
195196
final String[] args = { "-archiveName", harName, "-p", inputPathStr, "*",
196197
archivePath.toString() };
197-
Assertions.assertEquals(-1, ToolRunner.run(har, args));
198+
assertEquals(-1, ToolRunner.run(har, args));
198199
String output = byteStream.toString();
199200
final Path outputPath = new Path(archivePath, harName);
200-
Assertions.assertTrue(output.indexOf("Archive path: " + outputPath.toString()
201+
assertTrue(output.indexOf("Archive path: " + outputPath.toString()
201202
+ " already exists") != -1);
202203

203204
byteStream.reset();
@@ -207,9 +208,9 @@ public void testOutputPathValidity() throws Exception {
207208
final Path archivePath2 = new Path(archivePath, "sub1");
208209
final String[] args2 = { "-archiveName", harName, "-p", inputPathStr, "*",
209210
archivePath2.toString() };
210-
Assertions.assertEquals(-1, ToolRunner.run(har, args2));
211+
assertEquals(-1, ToolRunner.run(har, args2));
211212
output = byteStream.toString();
212-
Assertions.assertTrue(output.indexOf("Destination " + archivePath2.toString()
213+
assertTrue(output.indexOf("Destination " + archivePath2.toString()
213214
+ " should be a directory but is a file") != -1);
214215

215216
System.setErr(stderr);
@@ -239,7 +240,7 @@ public void testPathWithSpaces() throws Exception {
239240

240241
// compare results
241242
final List<String> harPaths = lsr(shell, fullHarPathStr);
242-
Assertions.assertEquals(originalPaths, harPaths);
243+
assertEquals(originalPaths, harPaths);
243244
}
244245

245246
@Test
@@ -258,7 +259,7 @@ public void testSingleFile() throws Exception {
258259

259260
// compare results:
260261
final List<String> harPaths = lsr(shell, fullHarPathStr);
261-
Assertions.assertEquals(originalPaths, harPaths);
262+
assertEquals(originalPaths, harPaths);
262263
}
263264

264265
@Test
@@ -283,7 +284,7 @@ public void testGlobFiles() throws Exception {
283284
// compare results:
284285
final List<String> harPaths = lsr(shell, fullHarPathStr,
285286
fullHarPathStr + "/" + glob);
286-
Assertions.assertEquals(originalPaths, harPaths);
287+
assertEquals(originalPaths, harPaths);
287288
}
288289

289290
private static List<String> lsr(final FsShell shell, String rootDir) throws Exception {
@@ -302,7 +303,7 @@ private static List<String> lsr(final FsShell shell, String rootDir,
302303
System.setErr(out);
303304
final String results;
304305
try {
305-
Assertions.assertEquals(0, shell.run(new String[] { "-lsr", dir }));
306+
assertEquals(0, shell.run(new String[] { "-lsr", dir }));
306307
results = bytes.toString();
307308
} finally {
308309
IOUtils.closeStream(out);

0 commit comments

Comments
 (0)