use of com.yahoo.bullet.parsing.Window in project bullet-core by yahoo.
the class TumblingTest method testNotClosedOnStrategyClosed.
@Test
public void testNotClosedOnStrategyClosed() {
Window window = makeTumblingWindow(Integer.MAX_VALUE);
ClosableStrategy strategy = new ClosableStrategy();
Tumbling tumbling = new Tumbling(strategy, window, config);
Assert.assertFalse(tumbling.initialize().isPresent());
Assert.assertFalse(tumbling.isClosed());
Assert.assertFalse(tumbling.isClosedForPartition());
strategy.setClosed(true);
Assert.assertFalse(tumbling.isClosed());
Assert.assertFalse(tumbling.isClosedForPartition());
}
use of com.yahoo.bullet.parsing.Window in project bullet-core by yahoo.
the class TumblingTest method make.
private Tumbling make(int length, int minimumWindow) {
config.set(BulletConfig.WINDOW_MIN_EMIT_EVERY, minimumWindow);
config.validate();
Window window = makeTumblingWindow(length);
return new Tumbling(strategy, window, config);
}
Aggregations