Author: pradeepkth
Date: Tue Dec 22 19:24:09 2009
New Revision: 893279

URL: http://svn.apache.org/viewvc?rev=893279&view=rev
Log:
simple fixes in unit tests failing after recent merge since file:<filename> is 
no longer supported in map reduce mode

Modified:
    
hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestBatchAliases.java
    
hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestMultiQuery.java

Modified: 
hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestBatchAliases.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestBatchAliases.java?rev=893279&r1=893278&r2=893279&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestBatchAliases.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestBatchAliases.java
 Tue Dec 22 19:24:09 2009
@@ -37,6 +37,7 @@
 
     private PigServer myPig;
 
+    @Override
     @Before
     public void setUp() throws Exception {
         cluster.setProperty("opt.multiquery", ""+true);
@@ -44,21 +45,24 @@
         deleteOutputFiles();
     }
 
+    @Override
     @After
     public void tearDown() throws Exception {
         myPig = null;
+        Util.deleteFile(cluster, "passwd");
     }
     
     @Test
-    public void testBatchAliases() {
+    public void testBatchAliases() throws IOException {
 
         // test case: key ('group') isn't part of foreach output
         // and keys have the same type.
-
+        Util.copyFromLocalToCluster(cluster, 
+                "test/org/apache/pig/test/data/passwd", "passwd");
         try {
             myPig.setBatchOn();
 
-            myPig.registerQuery("a = load 
'file:test/org/apache/pig/test/data/passwd' " +
+            myPig.registerQuery("a = load 'passwd' " +
                                 "using PigStorage(':') as (uname:chararray, 
passwd:chararray, uid:int, gid:int);");
             myPig.registerQuery("b = group a by uid;");
             myPig.registerQuery("c = group a by gid;");

Modified: 
hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestMultiQuery.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestMultiQuery.java?rev=893279&r1=893278&r2=893279&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestMultiQuery.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/test/org/apache/pig/test/TestMultiQuery.java
 Tue Dec 22 19:24:09 2009
@@ -235,11 +235,10 @@
     
     @Test
     public void testMultiQueryJiraPig1108() {
-        
         try {
             myPig.setBatchOn();
 
-            myPig.registerQuery("a = load 
'file:test/org/apache/pig/test/data/passwd' " 
+            myPig.registerQuery("a = load 'passwd' " 
                     + "using PigStorage(':') as (uname:chararray, 
passwd:chararray, uid:int, gid:int);");
             myPig.registerQuery("split a into plan1 if (uid > 5), plan2 if ( 
uid < 5);");
             myPig.registerQuery("b = group plan1 by uname;");


Reply via email to