hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From inigo...@apache.org
Subject [4/5] hadoop git commit: YARN-8422. TestAMSimulator failing with NPE. Contributed by Giovanni Matteo Fumarola.
Date Tue, 12 Jun 2018 18:03:03 GMT
YARN-8422. TestAMSimulator failing with NPE. Contributed by Giovanni Matteo Fumarola.

(cherry picked from commit c35481594ffc372e3f846b0c8ebc2ff9e36ffdb0)


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

Branch: refs/heads/branch-2
Commit: 85a7da0899ce86f2a8ccd3444d7ff31e81bc12b5
Parents: 85f3105
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 11:01:45 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/85a7da08/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 02dc26e..1963e96 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
@@ -48,8 +48,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() {
@@ -59,7 +59,7 @@ public class TestAMSimulator {
     });
   }
 
-  public TestAMSimulator(Class slsScheduler, Class scheduler) {
+  public TestAMSimulator(Class<?> slsScheduler, Class<?> scheduler) {
     this.slsScheduler = slsScheduler;
     this.scheduler = scheduler;
   }
@@ -110,7 +110,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) {
@@ -148,7 +149,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