Skip to content

Commit 7f047f3

Browse files
committed
YARN-11263. Fix Junit Test & CheckStyle.
1 parent d9cc9ff commit 7f047f3

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestContainerManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,12 +1200,12 @@ protected void testContainerLaunchAndExit(int exitCode) throws IOException,
12001200
@Test
12011201
public void testContainerLaunchAndExitSuccess() throws IOException,
12021202
InterruptedException, YarnException {
1203-
containerManager.start();
1203+
containerManager.start();
12041204
int exitCode = 0;
12051205

1206-
// launch context for a command that will return exit code 0
1207-
// and verify exit code returned
1208-
testContainerLaunchAndExit(exitCode);
1206+
// launch context for a command that will return exit code 0
1207+
// and verify exit code returned
1208+
testContainerLaunchAndExit(exitCode);
12091209
}
12101210

12111211
@Test

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/resources/gpu/TestGpuResourceAllocator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ public void testThreeContainersJustTwoOfThemSatisfied()
365365
assertEquals(1, testSubject.getAvailableGpus());
366366

367367
testSubject.assignGpus(container3);
368-
});
368+
});
369369

370370
assertThat(exception.getMessage()).contains("Failed to find enough GPUs");
371371
}

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/resourceplugin/com/nec/TestVEDeviceDiscoverer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,10 @@ public void testNonVESlotFilesAreSkipped() throws IOException {
241241
public void testNonBlockOrCharFilesAreRejected() throws IOException {
242242
IllegalArgumentException exception =
243243
assertThrows(IllegalArgumentException.class, () -> {
244-
createVeSlotFile(0);
245-
when(mockCommandExecutor.getOutput()).thenReturn("0:0:regular file");
246-
discoverer.getDevicesFromPath(testFolder);
247-
});
244+
createVeSlotFile(0);
245+
when(mockCommandExecutor.getOutput()).thenReturn("0:0:regular file");
246+
discoverer.getDevicesFromPath(testFolder);
247+
});
248248
assertThat(exception.getMessage()).contains("File is neither a char nor block device");
249249
}
250250

0 commit comments

Comments
 (0)