This is an automated email from the ASF dual-hosted git repository.

evansye pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git


The following commit(s) were added to refs/heads/master by this push:
     new 5ba5800  BIGTOP-3140. [Test] TestHadoopExamples.groovy can have $USER 
= null when running in Docker (#450)
5ba5800 is described below

commit 5ba58003ee6a4074b20e244c428413a2e02bff44
Author: Evans Ye <[email protected]>
AuthorDate: Sat Jan 19 15:40:33 2019 +0800

    BIGTOP-3140. [Test] TestHadoopExamples.groovy can have $USER = null when 
running in Docker (#450)
---
 .../org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy
 
b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy
index 1033180..6f7f07d 100644
--- 
a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy
+++ 
b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce/TestHadoopExamples.groovy
@@ -48,8 +48,9 @@ class TestHadoopExamples {
   private static final String HADOOP_COMMAND = System.getenv('HADOOP_COMMAND') 
?: "hadoop";
 
   // BIGTOP-3129: Only yarn can successfully write to staging dir, hence 
workaround by running as yarn.
+  // For normal case, use BIGTOP_TEST_USER variable when it's defined. 
Otherwise run as current user.
   private static final String BIGTOP_TEST_USER = "${HADOOP_COMMAND}" == 
"hadoop-qfs" ?
-    "yarn" : (System.getenv('BIGTOP_TEST_USER') ?: System.getenv('USER'))
+    "yarn" : (System.getenv('BIGTOP_TEST_USER') ?: "")
 
   private static String hadoopExamplesJar =
     JarContent.getJarName(HADOOP_MAPRED_HOME, 'hadoop.*examples.*.jar');

Reply via email to