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

LobAvroImportTestCase is sensitive to test method order execution

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.4
    • 1.4.5
    • None
    • 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).

      Attachments

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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: