PIG-5225: Several unit tests are not annotated with @Test (nkollar via rohini)

git-svn-id: https://svn.apache.org/repos/asf/pig/trunk@1797256 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/CHANGES.txt b/CHANGES.txt
index 7f22efe..4578115 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -28,6 +28,8 @@
  
 BUG FIXES
 
+PIG-5225: Several unit tests are not annotated with @Test (nkollar via rohini)
+
 
 Release 0.17.0
  
diff --git a/test/org/apache/pig/parser/TestQueryParser.java b/test/org/apache/pig/parser/TestQueryParser.java
index 4aa8691..585ebad 100644
--- a/test/org/apache/pig/parser/TestQueryParser.java
+++ b/test/org/apache/pig/parser/TestQueryParser.java
@@ -405,6 +405,7 @@
     }
 
     //PIG-2267
+    @Test
     public void testThatColNameIsGeneratedProperly() throws IOException {
         String query = "a = load '1.txt' as (int,(long,[]),{([])});"
                      + "b = foreach a generate val_0, tuple_0, bag_0;"
diff --git a/test/org/apache/pig/test/TestDataBag.java b/test/org/apache/pig/test/TestDataBag.java
index 1271945..9f8bfb7 100644
--- a/test/org/apache/pig/test/TestDataBag.java
+++ b/test/org/apache/pig/test/TestDataBag.java
@@ -862,6 +862,7 @@
         assertEquals(bg1, bg2);
     }
 
+    @Test
     public void testInternalCachedBag() throws Exception {
     	// check adding empty tuple
     	DataBag bg0 = new InternalCachedBag();
@@ -924,6 +925,7 @@
         assertEquals(bg4.size(), 0);
     }
 
+    @Test
     public void testInternalSortedBag() throws Exception {
 
     	// check adding empty tuple
@@ -1047,6 +1049,7 @@
         assertEquals(bg6, bg7);
     }
 
+    @Test
     public void testInternalDistinctBag() throws Exception {
     	// check adding empty tuple
     	DataBag bg0 = new InternalDistinctBag();
diff --git a/test/org/apache/pig/test/TestEvalPipelineLocal.java b/test/org/apache/pig/test/TestEvalPipelineLocal.java
index 460ae12..94d6cb5 100644
--- a/test/org/apache/pig/test/TestEvalPipelineLocal.java
+++ b/test/org/apache/pig/test/TestEvalPipelineLocal.java
@@ -17,7 +17,6 @@
  */
 package org.apache.pig.test;
 
-import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
@@ -27,7 +26,6 @@
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -37,11 +35,9 @@
 import java.util.Random;
 import java.util.Set;
 import java.util.StringTokenizer;
-import java.util.Collections;
 
 import org.apache.hadoop.mapreduce.Job;
 import org.apache.log4j.Appender;
-import org.apache.log4j.FileAppender;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.apache.log4j.SimpleLayout;
@@ -67,7 +63,6 @@
 import org.apache.pig.impl.util.Pair;
 import org.apache.pig.impl.util.UDFContext;
 import org.apache.pig.impl.util.Utils;
-import org.apache.pig.newplan.logical.rules.ColumnPruneVisitor;
 import org.apache.pig.test.utils.Identity;
 import org.junit.Assume;
 import org.junit.Before;
@@ -390,7 +385,7 @@
         testSortDistinct(false, false);
     }
     */
-    
+
     @Test
     public void testSortWithUDF() throws Exception{
         testSortDistinct(false, true);
@@ -455,7 +450,8 @@
         }
         
     }
-    
+
+    @Test
     public void testNestedPlan() throws Exception{
         int LOOP_COUNT = 10;
         File tmpFile = Util.createTempFileDelOnExit("test", "txt");
@@ -496,6 +492,7 @@
         Assert.assertEquals(LOOP_COUNT, numIdentity);
     }
 
+    @Test
     public void testNestedPlanWithExpressionAssignment() throws Exception{
         int LOOP_COUNT = 10;
         File tmpFile = Util.createTempFileDelOnExit("test", "txt");
@@ -541,6 +538,7 @@
         Assert.assertEquals(LOOP_COUNT, numIdentity);
     }
 
+    @Test
     public void testLimit() throws Exception{
         int LOOP_COUNT = 20;
         File tmpFile = Util.createTempFileDelOnExit("test", "txt");
@@ -789,6 +787,7 @@
         
     }
 
+    @Test
     public void testMapUDF() throws Exception{
         int LOOP_COUNT = 2;
         File tmpFile = Util.createTempFileDelOnExit("test", "txt");
@@ -832,38 +831,6 @@
         Assert.assertEquals(LOOP_COUNT * LOOP_COUNT, numIdentity);
     }
 
-    public void testMapUDFFail() throws Exception{
-        int LOOP_COUNT = 2;
-        File tmpFile = File.createTempFile("test", "txt");
-        tmpFile.deleteOnExit();
-        PrintStream ps = new PrintStream(new FileOutputStream(tmpFile));
-        for(int i = 0; i < LOOP_COUNT; i++) {
-            for(int j=0;j<LOOP_COUNT;j+=2){
-                ps.println(i+"\t"+j);
-                ps.println(i+"\t"+j);
-            }
-        }
-        ps.close();
-
-        pigServer.registerQuery("A = LOAD '"
-                + Util.generateURI(tmpFile.toString(), pigServer
-                        .getPigContext()) + "';");
-        pigServer.registerQuery("B = foreach A generate "
-                + MapUDF.class.getName() + "($0) as mymap;"); // the argument
-                                                              // does not matter
-        String query = "C = foreach B {"
-        + "generate mymap#'dba' * 10;"
-        + "};";
-
-        pigServer.registerQuery(query);
-        try {
-            Iterator<Tuple> iter = pigServer.openIterator("C");
-            Assert.fail("Error expected.");
-        } catch (Exception e) {
-            e.getMessage().contains("Cannot determine");
-        }
-    }
-
     @Test
     public void testLoadCtorArgs() throws IOException, ExecException {
         
diff --git a/test/org/apache/pig/test/TestHBaseStorage.java b/test/org/apache/pig/test/TestHBaseStorage.java
index 246feca..b76774f 100644
--- a/test/org/apache/pig/test/TestHBaseStorage.java
+++ b/test/org/apache/pig/test/TestHBaseStorage.java
@@ -432,6 +432,7 @@
         LOG.info("LoadFromHBase done");
     }
 
+    @Test
     public void testLoadWithFixedAndPrefixedCols3() throws IOException {
         prepareTable(TESTTABLE_1, true, DataFormat.UTF8PlainText);
 
diff --git a/test/org/apache/pig/test/TestPigServer.java b/test/org/apache/pig/test/TestPigServer.java
index 45b561d..de5ed47 100644
--- a/test/org/apache/pig/test/TestPigServer.java
+++ b/test/org/apache/pig/test/TestPigServer.java
@@ -368,6 +368,7 @@
         assertTrue(fs.delete(new Path(jarLocation), true));
     }
 
+    @Test
     public void testDescribeLoad() throws Throwable {
         PigServer pig = new PigServer(cluster.getExecType(), properties);
         pig.registerQuery("a = load 'a' as (field1: int, field2: float, field3: chararray );") ;
diff --git a/test/org/apache/pig/test/TestPruneColumn.java b/test/org/apache/pig/test/TestPruneColumn.java
index 45b911f..9d91069 100644
--- a/test/org/apache/pig/test/TestPruneColumn.java
+++ b/test/org/apache/pig/test/TestPruneColumn.java
@@ -2006,6 +2006,7 @@
         }
     }
 
+    @Test
     public void testAliasInRequiredFieldList() throws Exception{
         pigServer.registerQuery("A = load '"+ Util.generateURI(tmpFile1.toString(), pigServer.getPigContext()) + "' using "
                 + PruneColumnEvalFunc.class.getName() +"() as (a0, a1, a2);");