Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/25#discussion_r27976594
  
    --- Diff: 
test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java
 ---
    @@ -146,6 +146,41 @@ public void testGetSplits() throws IOException, 
AccumuloSecurityException, Accum
         AccumuloInputFormat.setAutoAdjustRanges(job, false);
         splits = inputFormat.getSplits(job);
         assertEquals(ranges.size(), splits.size());
    +
    +    //BatchScan not available for offline scans
    +    AccumuloInputFormat.setBatchScan(job, true);
    +
    +    AccumuloInputFormat.setOfflineTableScan(job, true);
    +    try {
    +      inputFormat.getSplits(job);
    +      fail("An exception should have been thrown");
    +    } catch (IOException e) {}
    +    AccumuloInputFormat.setOfflineTableScan(job, false);
    +
    +    //BatchScan not available with isolated iterators
    +    AccumuloInputFormat.setScanIsolation(job, true);
    +    try {
    +      inputFormat.getSplits(job);
    +      fail("An exception should have been thrown");
    +    } catch (IOException e) {}
    --- End diff --
    
    nevermind, I see `AccumuloInputFormat.setOfflineTableScan(job, false)` 
now.. I missed that earlier
    
    Could make the test slight stronger by asserting `getSplits()` does not 
fail after calling `AccumuloInputFormat.setOfflineTableScan(job, false)`.  This 
would detect any subsequent failures caused by inputFormat holding state 
related to the 1st failure.    
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to