You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Jarek Jarcec Cecho (JIRA)" <ji...@apache.org> on 2013/08/27 22:59:52 UTC

[jira] [Created] (SQOOP-1185) LobAvroImportTestCase is sensitive to test method order execution

Jarek Jarcec Cecho created SQOOP-1185:
-----------------------------------------

             Summary: LobAvroImportTestCase is sensitive to test method order execution
                 Key: SQOOP-1185
                 URL: https://issues.apache.org/jira/browse/SQOOP-1185
             Project: Sqoop
          Issue Type: Bug
    Affects Versions: 1.4.4
            Reporter: Jarek Jarcec Cecho
            Assignee: Jarek Jarcec Cecho
             Fix For: 1.4.5


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:

{code}
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
{code}

With failing one:

{code}
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
{code}

The test method order is different which seems to be causing the issues. The failure is on line [208|https://github.com/apache/sqoop/blob/trunk/src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java#L208] where we are expecting end of the lob pointer to contain the [getTableNum()|https://github.com/apache/sqoop/blob/trunk/src/test/com/cloudera/sqoop/testutil/LobAvroImportTestCase.java#L204]. 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).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira