You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Rohini Palaniswamy (JIRA)" <ji...@apache.org> on 2012/09/19 21:49:08 UTC

[jira] [Updated] (PIG-2908) Fix unit tests to work with jdk7

     [ https://issues.apache.org/jira/browse/PIG-2908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rohini Palaniswamy updated PIG-2908:
------------------------------------

    Attachment: PIG-2908-trunk.patch
                PIG-2908-branch10.patch

Review: 
 https://reviews.apache.org/r/7176/

Steps to Run Tests:

for test in {TestLogToPhyCompiler,TestMRCompiler,TestMapSideCogroup,TestMergeJoinOuter,TestGFCross,TestJsonLoaderStorage,TestNewPlanLogToPhyTranslationVisitor}; do ant clean test -Dtestcase=$test -Dtest.output=true -logfile PIG-2908-$test-H20.log; done
cd contrib/piggybank/java
for test in {TestAvroStorage,TestCSVExcelStorage}; do ant clean test -Dtestcase=$test -Dtest.output=true -logfile PIG-2908-$test-H20.log; done
cd -
for test in {TestLogToPhyCompiler,TestMRCompiler,TestMapSideCogroup,TestMergeJoinOuter,TestGFCross,TestJsonLoaderStorage,TestNewPlanLogToPhyTranslationVisitor}; do ant clean test -Dhadoopversion=23 -Dtestcase=$test -Dtest.output=true -logfile PIG-2908-$test-H23.log; done
grep BUILD PIG-2908*
cd contrib/piggybank/java
for test in {TestAvroStorage,TestCSVExcelStorage}; do ant clean test -Dhadoopversion=23 -Dtestcase=$test -Dtest.output=true -logfile PIG-2908-$test-H23.log; done
grep BUILD PIG-2908*

For trunk, tests depending on MiniCluster will fail in H23. That requires PIG-2791 to be checked in. 

Checkin Steps:
  There is a new java class and svn add needs to be done.
svn add test/org/apache/pig/test/junit

There is a overlap between this patch and PIG-2405 for one test - TestNewPlanLogToPhyTranslationVisitor class. Fang has solved it by changing it to a LinkedHashMap in MapReduceOper.java and OperatorPlan.java. I have just modified tests to sort the entrySet results and then assert. If LinkedHashMap approach is preferred, I can remove TestNewPlanLogToPhyTranslationVisitor from this patch. But in general, would prefer not changing code for tests to work.  
                
> Fix unit tests to work with jdk7
> --------------------------------
>
>                 Key: PIG-2908
>                 URL: https://issues.apache.org/jira/browse/PIG-2908
>             Project: Pig
>          Issue Type: Test
>            Reporter: Rohini Palaniswamy
>            Assignee: Rohini Palaniswamy
>            Priority: Minor
>         Attachments: PIG-2908-branch10.patch, PIG-2908-trunk.patch
>
>
> Fix unit tests that fail when compiling with jdk7 as they depend on the order of tests run - TestGFCross, TestJsonLoaderStorage, TestLogToPhyCompiler, TestMRCompiler, TestMergeJoinOuter and TestNewPlanLogToPhyTranslationVisitor. jdk7 returns methods in a different order during reflection.

--
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