Skip to content

Commit defe3d5

Browse files
vinayakumarbslfan1989
authored andcommitted
HADOOP-19617. Fix Junit Test Error.
1 parent b1cf68c commit defe3d5

File tree

1 file changed

+8
-0
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/test/java/org/apache/hadoop/yarn/applications/distributedshell

1 file changed

+8
-0
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/test/java/org/apache/hadoop/yarn/applications/distributedshell/DistributedShellBaseTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import java.util.concurrent.atomic.AtomicReference;
3434
import java.util.function.Supplier;
3535

36+
import org.apache.hadoop.security.UserGroupInformation;
3637
import org.junit.jupiter.api.AfterEach;
3738
import org.junit.jupiter.api.AfterAll;
3839
import org.junit.jupiter.api.BeforeEach;
@@ -545,6 +546,13 @@ protected void setupInternal(int numNodeManagers,
545546
getTimelineVersion());
546547
// setup the configuration of relevant for each TimelineService version.
547548
customizeConfiguration(conf);
549+
550+
String nodeLabels = "file:///tmp/hadoop-yarn-" +
551+
UserGroupInformation.getCurrentUser().getShortUserName() +
552+
"/node-labels";
553+
java.nio.file.Path path = Paths.get(nodeLabels);
554+
Files.deleteIfExists(path);
555+
548556
// setup the yarn cluster.
549557
setUpYarnCluster(numNodeManagers, conf);
550558
}

0 commit comments

Comments
 (0)