Search in sources :

Example 1 with TumblingWindowCorrectness

use of org.apache.storm.st.topology.window.TumblingWindowCorrectness in project storm by apache.

the class TumblingWindowTest method testTumbleCount.

@Test(dataProvider = "generateWindows")
public void testTumbleCount(int tumbleSize) throws Exception {
    final TumblingWindowCorrectness testable = new TumblingWindowCorrectness(tumbleSize);
    final String topologyName = this.getClass().getSimpleName() + "t" + tumbleSize;
    if (tumbleSize <= 0) {
        try {
            testable.newTopology();
            Assert.fail("Expected IllegalArgumentException was not thrown.");
        } catch (IllegalArgumentException ignore) {
            return;
        }
    }
    topo = new TopoWrap(cluster, topologyName, testable.newTopology());
    SlidingWindowTest.runAndVerifyCount(tumbleSize, tumbleSize, testable, topo);
}
Also used : TumblingWindowCorrectness(org.apache.storm.st.topology.window.TumblingWindowCorrectness) TopoWrap(org.apache.storm.st.wrapper.TopoWrap) Test(org.testng.annotations.Test) AbstractTest(org.apache.storm.st.helper.AbstractTest)

Aggregations

AbstractTest (org.apache.storm.st.helper.AbstractTest)1 TumblingWindowCorrectness (org.apache.storm.st.topology.window.TumblingWindowCorrectness)1 TopoWrap (org.apache.storm.st.wrapper.TopoWrap)1 Test (org.testng.annotations.Test)1