pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject svn commit: r1770732 - in /pig/branches/branch-0.16: CHANGES.txt test/org/apache/pig/test/TestScriptUDF.java
Date Mon, 21 Nov 2016 18:36:06 GMT
Author: daijy
Date: Mon Nov 21 18:36:06 2016
New Revision: 1770732

URL: http://svn.apache.org/viewvc?rev=1770732&view=rev
Log:
PIG-5064: NPE in TestScriptUDF#testPythonBuiltinModuleImport1 when JAVA_HOME is not set

Modified:
    pig/branches/branch-0.16/CHANGES.txt
    pig/branches/branch-0.16/test/org/apache/pig/test/TestScriptUDF.java

Modified: pig/branches/branch-0.16/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.16/CHANGES.txt?rev=1770732&r1=1770731&r2=1770732&view=diff
==============================================================================
--- pig/branches/branch-0.16/CHANGES.txt (original)
+++ pig/branches/branch-0.16/CHANGES.txt Mon Nov 21 18:36:06 2016
@@ -32,6 +32,8 @@ OPTIMIZATIONS
 
 BUG FIXES
 
+PIG-5064: NPE in TestScriptUDF#testPythonBuiltinModuleImport1 when JAVA_HOME is not set (water
via daijy)
+
 PIG-5048: HiveUDTF fail if it is the first expression in projection (nkollar via daijy)
 
 PIG-5033: MultiQueryOptimizerTez creates bad plan with union, split and FRJoin (rohini,tmwoordruff
via rohini)

Modified: pig/branches/branch-0.16/test/org/apache/pig/test/TestScriptUDF.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.16/test/org/apache/pig/test/TestScriptUDF.java?rev=1770732&r1=1770731&r2=1770732&view=diff
==============================================================================
--- pig/branches/branch-0.16/test/org/apache/pig/test/TestScriptUDF.java (original)
+++ pig/branches/branch-0.16/test/org/apache/pig/test/TestScriptUDF.java Mon Nov 21 18:36:06
2016
@@ -247,7 +247,11 @@ public class TestScriptUDF{
         Assert.assertTrue(t.get(0).toString().equals(System.getenv(input[0])));
         Assert.assertTrue(iter.hasNext());
         t = iter.next();
-        Assert.assertTrue(t.get(0).toString().equals(System.getenv(input[1])));
+        if (System.getenv(input[1]) != null) {  // JAVA_HOME is set, t.get(0) is not null
+            Assert.assertTrue(t.get(0).toString().equals(System.getenv(input[1])));
+        } else {  // JAVA_HOME is not set, t.get(0) is null
+            Assert.assertNull(t.get(0));
+        }
         Assert.assertFalse(iter.hasNext());
     }
 



Mime
View raw message