Search in sources :

Example 1 with TumblingTimeCorrectness

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

the class TumblingWindowTest method testTumbleTime.

@Test(dataProvider = "generateTumbleTimes")
public void testTumbleTime(int tumbleSec) throws Exception {
    final TumblingTimeCorrectness testable = new TumblingTimeCorrectness(tumbleSec);
    final String topologyName = this.getClass().getSimpleName() + "t" + tumbleSec;
    if (tumbleSec <= 0) {
        try {
            testable.newTopology();
            Assert.fail("Expected IllegalArgumentException was not thrown.");
        } catch (IllegalArgumentException ignore) {
            return;
        }
    }
    topo = new TopoWrap(cluster, topologyName, testable.newTopology());
    SlidingWindowTest.runAndVerifyTime(tumbleSec, tumbleSec, testable, topo);
}
Also used : TumblingTimeCorrectness(org.apache.storm.st.topology.window.TumblingTimeCorrectness) 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 TumblingTimeCorrectness (org.apache.storm.st.topology.window.TumblingTimeCorrectness)1 TopoWrap (org.apache.storm.st.wrapper.TopoWrap)1 Test (org.testng.annotations.Test)1