Review Board 1.7.22


PIG-2405: some unit test case failed with open JDK

Review Request #7898 - Created Nov. 6, 2012 and updated

Fang Fang Chen
trunk
PIG-2405
Reviewers
pig
pig
For PIG-2405, fix 3 UTs:TestDataModel, TestMRCompiler, and TestPruneColumn
The 3 UTs passed in both sun and opensource JDK.
test-commit passed.
test-patch failed, but the failure isn't introduced by the patch. There are [javadoc] 38 warnings in original trunk branch.[PIG-3033]
[exec] -1 overall.
[exec]
[exec] +1 @author. The patch does not contain any @author tags.
[exec]
[exec] +1 tests included. The patch appears to include 12 new or modified tests.
[exec]
[exec] -1 javadoc. The javadoc tool appears to have generated 1 warning messages.
[exec]
[exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
[exec]
[exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
[exec]
[exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.
trunk/test/org/apache/pig/test/TestDataModel.java
Revision 1406517 New Change
[20] 30 lines
[+20]
31
import java.util.HashMap;
31
import java.util.HashMap;
32
import java.util.Iterator;
32
import java.util.Iterator;
33
import java.util.List;
33
import java.util.List;
34
import java.util.Map;
34
import java.util.Map;
35
import java.util.Random;
35
import java.util.Random;

    
   
36
import java.util.LinkedHashMap;
36

    
   
37

   
37
import org.junit.Test;
38
import org.junit.Test;
38

    
   
39

   
39
import org.apache.pig.backend.executionengine.ExecException;
40
import org.apache.pig.backend.executionengine.ExecException;
40
import org.apache.pig.data.*;
41
import org.apache.pig.data.*;
[+20] [20] 551 lines
[+20] [+] private Tuple giveMeOneOfEach() throws Exception {
592

    
   
593

   
593
        DataBag bag = BagFactory.getInstance().newDefaultBag();
594
        DataBag bag = BagFactory.getInstance().newDefaultBag();
594
        bag.add(tf.newTuple(new Integer(4)));
595
        bag.add(tf.newTuple(new Integer(4)));
595
        bag.add(tf.newTuple(new String("mary had a little lamb")));
596
        bag.add(tf.newTuple(new String("mary had a little lamb")));
596

    
   
597

   
597
        Map<String, Object> map = new HashMap<String, Object>(2);
598
        Map<String, Object> map = new LinkedHashMap<String, Object>(2);
598
        map.put(new String("hello"), new String("world"));
599
        map.put(new String("hello"), new String("world"));
599
        map.put(new String("goodbye"), new String("all"));
600
        map.put(new String("goodbye"), new String("all"));
600

    
   
601

   
601
        t1.set(0, t2);
602
        t1.set(0, t2);
602
        t1.set(1, bag);
603
        t1.set(1, bag);
[+20] [20] 12 lines
trunk/test/org/apache/pig/test/TestMRCompiler.java
Revision 1406517 New Change
 
trunk/test/org/apache/pig/test/TestPruneColumn.java
Revision 1406517 New Change
 
trunk/test/org/apache/pig/test/utils/TestHelper.java
Revision 1406517 New Change
 
  1. trunk/test/org/apache/pig/test/TestDataModel.java: Loading...
  2. trunk/test/org/apache/pig/test/TestMRCompiler.java: Loading...
  3. trunk/test/org/apache/pig/test/TestPruneColumn.java: Loading...
  4. trunk/test/org/apache/pig/test/utils/TestHelper.java: Loading...