Search in sources :

Example 1 with SlidingWindowCorrectness

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

the class SlidingWindowTest method testWindowCount.

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