accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject accumulo git commit: ACCUMULO-3602 Fix failing AccumuloInputFormatIT
Date Sat, 18 Apr 2015 23:21:08 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 21a57fbc2 -> b29bd921b


ACCUMULO-3602 Fix failing AccumuloInputFormatIT


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b29bd921
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b29bd921
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b29bd921

Branch: refs/heads/master
Commit: b29bd921b7d91ec07fae20549a365fc6b7f11d0a
Parents: 21a57fb
Author: Josh Elser <elserj@apache.org>
Authored: Sat Apr 18 19:20:07 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Sat Apr 18 19:20:07 2015 -0400

----------------------------------------------------------------------
 .../test/functional/AccumuloInputFormatIT.java      | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b29bd921/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java
b/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java
index bc607c3..602662b 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java
@@ -130,7 +130,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterIT {
       fail("An exception should have been thrown");
     } catch (IOException e) {}
 
-    conn.tableOperations().offline(table);
+    conn.tableOperations().offline(table, true);
     splits = inputFormat.getSplits(job);
     assertEquals(actualSplits.size(), splits.size());
 
@@ -149,16 +149,20 @@ public class AccumuloInputFormatIT extends AccumuloClusterIT {
 
     //BatchScan not available for offline scans
     AccumuloInputFormat.setBatchScan(job, true);
+    // Reset auto-adjust ranges too
+    AccumuloInputFormat.setAutoAdjustRanges(job, true);
 
     AccumuloInputFormat.setOfflineTableScan(job, true);
     try {
       inputFormat.getSplits(job);
       fail("An exception should have been thrown");
-    } catch (IOException e) {}
+    } catch (IllegalArgumentException e) {}
+
+    conn.tableOperations().online(table, true);
     AccumuloInputFormat.setOfflineTableScan(job, false);
 
     // test for resumption of success
-    inputFormat.getSplits(job);
+    splits = inputFormat.getSplits(job);
     assertEquals(2, splits.size());
 
     //BatchScan not available with isolated iterators
@@ -166,11 +170,11 @@ public class AccumuloInputFormatIT extends AccumuloClusterIT {
     try {
       inputFormat.getSplits(job);
       fail("An exception should have been thrown");
-    } catch (IOException e) {}
+    } catch (IllegalArgumentException e) {}
     AccumuloInputFormat.setScanIsolation(job, false);
 
     // test for resumption of success
-    inputFormat.getSplits(job);
+    splits = inputFormat.getSplits(job);
     assertEquals(2, splits.size());
 
     //BatchScan not available with local iterators
@@ -178,7 +182,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterIT {
     try {
       inputFormat.getSplits(job);
       fail("An exception should have been thrown");
-    } catch (IOException e) {}
+    } catch (IllegalArgumentException e) {}
     AccumuloInputFormat.setLocalIterators(job, false);
 
     //Check we are getting back correct type pf split


Mime
View raw message