Uploaded image for project: 'Sqoop'
  1. Sqoop
  2. SQOOP-1185

LobAvroImportTestCase is sensitive to test method order execution

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.4
    • Fix Version/s: 1.4.5
    • Component/s: None
    • Labels:
      None

      Description

      The test case LobAvroImportTestCase is sensitive to order in which the testing methods are executed. When playing with combination of JDK6 and JDK7 I was able to make it consistently fail. Considering working test case output:

      Testcase: testBlobAvroImportInline took 6.743 sec
      Testcase: testBlobAvroImportExternal took 2.364 sec
      Testcase: testBlobCompressedAvroImportInline took 2.134 sec
      Testcase: testBlobCompressedAvroImportExternal took 1.955 sec
      Testcase: testBlobAvroImportMultiCols took 2.836 sec
      Testcase: testClobAvroImportInline took 0.065 sec
      Testcase: testClobAvroImportExternal took 0.069 sec
      Testcase: testClobCompressedAvroImportInline took 0.059 sec
      Testcase: testClobCompressedAvroImportExternal took 0.068 sec
      Testcase: testClobAvroImportMultiCols took 0.061 sec
      

      With failing one:

      Testcase: testBlobCompressedAvroImportExternal took 4.106 sec
      Testcase: testClobAvroImportMultiCols took 0.069 sec
      Testcase: testBlobAvroImportExternal took 1.563 sec
      	FAILED
      null
      junit.framework.AssertionFailedError
      	at com.cloudera.sqoop.testutil.LobAvroImportTestCase.testBlobAvroImportExternal(LobAvroImportTestCase.java:208)
      
      Testcase: testClobCompressedAvroImportExternal took 0.061 sec
      Testcase: testBlobCompressedAvroImportInline took 1.86 sec
      Testcase: testClobCompressedAvroImportInline took 0.071 sec
      Testcase: testClobAvroImportInline took 0.068 sec
      Testcase: testBlobAvroImportInline took 1.584 sec
      Testcase: testClobAvroImportExternal took 0.063 sec
      Testcase: testBlobAvroImportMultiCols took 1.921 sec
      

      The test method order is different which seems to be causing the issues. The failure is on line 208 where we are expecting end of the lob pointer to contain the getTableNum(). However as the pointer generation is not tied to the table name, but only to a mapreduce job id, it will work only if the test cases will be executed in particular order (e.g. getTableNum() and number of executed mapreduce jobs will be equal).

      1. SQOOP-1185.patch
        1 kB
        Jarek Jarcec Cecho

        Issue Links

          Activity

          Hide
          hshreedharan Hari Shreedharan added a comment -

          +1. Committing.

          Show
          hshreedharan Hari Shreedharan added a comment - +1. Committing.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 127d2ddec1c35aed5211f2729083bcc8987b4ec5 in branch refs/heads/trunk from Hari Shreedharan
          [ https://git-wip-us.apache.org/repos/asf?p=sqoop.git;h=127d2dd ]

          SQOOP-1185. LobAvroImportTestCase is sensitive to test method order execution

          (Jarek Jarcec Cecho via Hari Shreedharan)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 127d2ddec1c35aed5211f2729083bcc8987b4ec5 in branch refs/heads/trunk from Hari Shreedharan [ https://git-wip-us.apache.org/repos/asf?p=sqoop.git;h=127d2dd ] SQOOP-1185 . LobAvroImportTestCase is sensitive to test method order execution (Jarek Jarcec Cecho via Hari Shreedharan)
          Hide
          hshreedharan Hari Shreedharan added a comment -

          Committed! Thanks Jarcec!

          Show
          hshreedharan Hari Shreedharan added a comment - Committed! Thanks Jarcec!
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Sqoop-ant-jdk-1.6-hadoop200 #848 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop200/848/)
          SQOOP-1185. LobAvroImportTestCase is sensitive to test method order execution (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=127d2ddec1c35aed5211f2729083bcc8987b4ec5)

          • src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java
          • ivy/libraries.properties
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Sqoop-ant-jdk-1.6-hadoop200 #848 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop200/848/ ) SQOOP-1185 . LobAvroImportTestCase is sensitive to test method order execution (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=127d2ddec1c35aed5211f2729083bcc8987b4ec5 ) src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java ivy/libraries.properties
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Sqoop-ant-jdk-1.6-hadoop20 #845 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop20/845/)
          SQOOP-1185. LobAvroImportTestCase is sensitive to test method order execution (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=127d2ddec1c35aed5211f2729083bcc8987b4ec5)

          • src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java
          • ivy/libraries.properties
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Sqoop-ant-jdk-1.6-hadoop20 #845 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop20/845/ ) SQOOP-1185 . LobAvroImportTestCase is sensitive to test method order execution (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=127d2ddec1c35aed5211f2729083bcc8987b4ec5 ) src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java ivy/libraries.properties
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Sqoop-ant-jdk-1.6-hadoop23 #1043 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop23/1043/)
          SQOOP-1185. LobAvroImportTestCase is sensitive to test method order execution (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=127d2ddec1c35aed5211f2729083bcc8987b4ec5)

          • src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java
          • ivy/libraries.properties
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Sqoop-ant-jdk-1.6-hadoop23 #1043 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop23/1043/ ) SQOOP-1185 . LobAvroImportTestCase is sensitive to test method order execution (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=127d2ddec1c35aed5211f2729083bcc8987b4ec5 ) src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java ivy/libraries.properties
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Sqoop-ant-jdk-1.6-hadoop100 #804 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop100/804/)
          SQOOP-1185. LobAvroImportTestCase is sensitive to test method order execution (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=127d2ddec1c35aed5211f2729083bcc8987b4ec5)

          • ivy/libraries.properties
          • src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Sqoop-ant-jdk-1.6-hadoop100 #804 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop100/804/ ) SQOOP-1185 . LobAvroImportTestCase is sensitive to test method order execution (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=127d2ddec1c35aed5211f2729083bcc8987b4ec5 ) ivy/libraries.properties src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java
          Hide
          jarcec Jarek Jarcec Cecho added a comment -

          The failure in profile 200 is a jenkins issue.

          Show
          jarcec Jarek Jarcec Cecho added a comment - The failure in profile 200 is a jenkins issue.

            People

            • Assignee:
              jarcec Jarek Jarcec Cecho
              Reporter:
              jarcec Jarek Jarcec Cecho
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development