hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [09/50] [abbrv] hadoop git commit: YARN-8422. TestAMSimulator failing with NPE. Contributed by Giovanni Matteo Fumarola.
Date Thu, 14 Jun 2018 16:50:05 GMT
YARN-8422. TestAMSimulator failing with NPE. Contributed by Giovanni Matteo Fumarola.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/c3548159
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/c3548159
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/c3548159

Branch: refs/heads/HDDS-48
Commit: c35481594ffc372e3f846b0c8ebc2ff9e36ffdb0
Parents: 6e756e8
Author: Inigo Goiri <inigoiri@apache.org>
Authored: Tue Jun 12 10:59:50 2018 -0700
Committer: Inigo Goiri <inigoiri@apache.org>
Committed: Tue Jun 12 10:59:50 2018 -0700

----------------------------------------------------------------------
 .../hadoop/yarn/sls/appmaster/TestAMSimulator.java     | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c3548159/hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/appmaster/TestAMSimulator.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/appmaster/TestAMSimulator.java
b/hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/appmaster/TestAMSimulator.java
index bfc7d0c..bc8ea70 100644
--- a/hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/appmaster/TestAMSimulator.java
+++ b/hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/appmaster/TestAMSimulator.java
@@ -49,8 +49,8 @@ public class TestAMSimulator {
   private YarnConfiguration conf;
   private Path metricOutputDir;
 
-  private Class slsScheduler;
-  private Class scheduler;
+  private Class<?> slsScheduler;
+  private Class<?> scheduler;
 
   @Parameterized.Parameters
   public static Collection<Object[]> params() {
@@ -60,7 +60,7 @@ public class TestAMSimulator {
     });
   }
 
-  public TestAMSimulator(Class slsScheduler, Class scheduler) {
+  public TestAMSimulator(Class<?> slsScheduler, Class<?> scheduler) {
     this.slsScheduler = slsScheduler;
     this.scheduler = scheduler;
   }
@@ -115,7 +115,8 @@ public class TestAMSimulator {
   }
 
   private void createMetricOutputDir() {
-    Path testDir = Paths.get(System.getProperty("test.build.data"));
+    Path testDir =
+        Paths.get(System.getProperty("test.build.data", "target/test-dir"));
     try {
       metricOutputDir = Files.createTempDirectory(testDir, "output");
     } catch (IOException e) {
@@ -153,7 +154,9 @@ public class TestAMSimulator {
 
   @After
   public void tearDown() {
-    rm.stop();
+    if (rm != null) {
+      rm.stop();
+    }
 
     deleteMetricOutputDir();
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message