You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2015/05/24 22:51:37 UTC

svn commit: r1681527 - /pig/branches/branch-0.15/test/org/apache/pig/test/TestAssert.java

Author: daijy
Date: Sun May 24 20:51:37 2015
New Revision: 1681527

URL: http://svn.apache.org/r1681527
Log:
PIG-3994: Implement getting backend exception for Tez (PIG-3994-2.patch)

Modified:
    pig/branches/branch-0.15/test/org/apache/pig/test/TestAssert.java

Modified: pig/branches/branch-0.15/test/org/apache/pig/test/TestAssert.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.15/test/org/apache/pig/test/TestAssert.java?rev=1681527&r1=1681526&r2=1681527&view=diff
==============================================================================
--- pig/branches/branch-0.15/test/org/apache/pig/test/TestAssert.java (original)
+++ pig/branches/branch-0.15/test/org/apache/pig/test/TestAssert.java Sun May 24 20:51:37 2015
@@ -116,8 +116,13 @@ public class TestAssert {
       try {
           pigServer.openIterator("A");
       } catch (FrontendException fe) {
-          Assert.assertTrue(fe.getCause().getMessage().contains(
-                  "Job terminated with anomalous status FAILED"));
+          if (pigServer.getPigContext().getExecType().toString().startsWith("TEZ")) {
+              Assert.assertTrue(fe.getCause().getMessage().contains(
+                      "Assertion violated: i should be greater than 1"));
+          } else {
+              Assert.assertTrue(fe.getCause().getMessage().contains(
+                      "Job terminated with anomalous status FAILED"));
+          }
       }
   }
 
@@ -142,8 +147,13 @@ public class TestAssert {
       try {
           pigServer.openIterator("A");
       } catch (FrontendException fe) {
-          Assert.assertTrue(fe.getCause().getMessage().contains(
-                  "Job terminated with anomalous status FAILED"));
+          if (pigServer.getPigContext().getExecType().toString().startsWith("TEZ")) {
+              Assert.assertTrue(fe.getCause().getMessage().contains(
+                      "Assertion violated: i should be greater than 1"));
+          } else {
+              Assert.assertTrue(fe.getCause().getMessage().contains(
+                      "Job terminated with anomalous status FAILED"));
+          }
       }
   }