Search in sources :

Example 1 with IteratorTestInput

use of org.apache.accumulo.iteratortest.IteratorTestInput in project accumulo by apache.

the class JUnitFrameworkTest method parameters.

@Parameters
public static Object[][] parameters() {
    IteratorTestInput input = getIteratorInput();
    IteratorTestOutput output = getIteratorOutput();
    List<IteratorTestCase> tests = Collections.singletonList(new NoopIteratorTestCase());
    return BaseJUnit4IteratorTest.createParameters(input, output, tests);
}
Also used : IteratorTestOutput(org.apache.accumulo.iteratortest.IteratorTestOutput) IteratorTestCase(org.apache.accumulo.iteratortest.testcases.IteratorTestCase) IteratorTestInput(org.apache.accumulo.iteratortest.IteratorTestInput) Parameters(org.junit.runners.Parameterized.Parameters)

Example 2 with IteratorTestInput

use of org.apache.accumulo.iteratortest.IteratorTestInput in project accumulo by apache.

the class AgeOffFilterTest method getIteratorInput.

private static IteratorTestInput getIteratorInput() {
    IteratorSetting setting = new IteratorSetting(50, AgeOffFilter.class);
    AgeOffFilter.setCurrentTime(setting, NOW);
    AgeOffFilter.setTTL(setting, TTL);
    return new IteratorTestInput(AgeOffFilter.class, setting.getOptions(), new Range(), INPUT_DATA);
}
Also used : IteratorSetting(org.apache.accumulo.core.client.IteratorSetting) IteratorTestInput(org.apache.accumulo.iteratortest.IteratorTestInput) Range(org.apache.accumulo.core.data.Range)

Example 3 with IteratorTestInput

use of org.apache.accumulo.iteratortest.IteratorTestInput in project accumulo by apache.

the class AgeOffFilterTest method parameters.

@Parameters
public static Object[][] parameters() {
    // Test ageoff after 30 seconds.
    NOW = System.currentTimeMillis();
    TTL = 30 * 1000;
    IteratorTestInput input = getIteratorInput();
    IteratorTestOutput output = getIteratorOutput();
    List<IteratorTestCase> tests = IteratorTestCaseFinder.findAllTestCases();
    return BaseJUnit4IteratorTest.createParameters(input, output, tests);
}
Also used : IteratorTestOutput(org.apache.accumulo.iteratortest.IteratorTestOutput) IteratorTestCase(org.apache.accumulo.iteratortest.testcases.IteratorTestCase) IteratorTestInput(org.apache.accumulo.iteratortest.IteratorTestInput) Parameters(org.junit.runners.Parameterized.Parameters)

Example 4 with IteratorTestInput

use of org.apache.accumulo.iteratortest.IteratorTestInput in project accumulo by apache.

the class CfCqSliceFilterTest method parameters.

@Parameters
public static Object[][] parameters() {
    IteratorTestInput input = getIteratorInput();
    IteratorTestOutput output = getIteratorOutput();
    List<IteratorTestCase> tests = IteratorTestCaseFinder.findAllTestCases();
    return BaseJUnit4IteratorTest.createParameters(input, output, tests);
}
Also used : IteratorTestOutput(org.apache.accumulo.iteratortest.IteratorTestOutput) IteratorTestCase(org.apache.accumulo.iteratortest.testcases.IteratorTestCase) IteratorTestInput(org.apache.accumulo.iteratortest.IteratorTestInput) Parameters(org.junit.runners.Parameterized.Parameters)

Example 5 with IteratorTestInput

use of org.apache.accumulo.iteratortest.IteratorTestInput in project accumulo by apache.

the class CfCqSliceFilterTest method getIteratorInput.

private static IteratorTestInput getIteratorInput() {
    HashMap<String, String> options = new HashMap<>();
    options.put(CfCqSliceOpts.OPT_MIN_CF, MIN_CF);
    options.put(CfCqSliceOpts.OPT_MAX_CF, MAX_CF);
    options.put(CfCqSliceOpts.OPT_MIN_CQ, MIN_CQ);
    options.put(CfCqSliceOpts.OPT_MAX_CQ, MAX_CQ);
    return new IteratorTestInput(CfCqSliceFilter.class, options, new Range(), INPUT_DATA);
}
Also used : HashMap(java.util.HashMap) IteratorTestInput(org.apache.accumulo.iteratortest.IteratorTestInput) Range(org.apache.accumulo.core.data.Range)

Aggregations

IteratorTestInput (org.apache.accumulo.iteratortest.IteratorTestInput)8 IteratorTestOutput (org.apache.accumulo.iteratortest.IteratorTestOutput)5 IteratorTestCase (org.apache.accumulo.iteratortest.testcases.IteratorTestCase)5 Parameters (org.junit.runners.Parameterized.Parameters)5 Range (org.apache.accumulo.core.data.Range)3 IteratorSetting (org.apache.accumulo.core.client.IteratorSetting)2 HashMap (java.util.HashMap)1