Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-3286

TestPigContext.testImportList fails in trunk

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.12.0
    • 0.12.0
    • build

    Description

      To reproduce, run ant clean test -Dtestcase=TestPigContext. It fails with the following error:

      junit.framework.AssertionFailedError: expected:<5> but was:<6>
      	at org.apache.pig.test.TestPigContext.testImportList(TestPigContext.java:157)
      

      This is a regression from PIG-3198 that added "java.lang." to the default import list. Here is relevant code:

      @@ -739,6 +739,7 @@ public class PigContext implements Serializable {
               if (packageImportList.get() == null) {
                   ArrayList<String> importlist = new ArrayList<String>();
                   importlist.add("");
      +            importlist.add("java.lang.");
                   importlist.add("org.apache.pig.builtin.");
                   importlist.add("org.apache.pig.impl.builtin.");
                   packageImportList.set(importlist);
      

      Attachments

        1. PIG-3286-2.patch
          2 kB
          Cheolsoo Park
        2. PIG-3286.patch
          1 kB
          Cheolsoo Park

        Issue Links

          Activity

            People

              cheolsoo Cheolsoo Park
              cheolsoo Cheolsoo Park
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: