Search in sources :

Example 6 with ConsistentRegionConfig

use of com.ibm.streamsx.topology.consistent.ConsistentRegionConfig in project streamsx.topology by IBMStreams.

the class ConsistentRegionConfigTest method testChangeAttempts.

@Test
public void testChangeAttempts() {
    ConsistentRegionConfig config = periodic(9).maxConsecutiveResetAttempts(10);
    checkCRC(config, Trigger.PERIODIC, 9, 180, 180, 10);
}
Also used : ConsistentRegionConfig(com.ibm.streamsx.topology.consistent.ConsistentRegionConfig) Test(org.junit.Test)

Example 7 with ConsistentRegionConfig

use of com.ibm.streamsx.topology.consistent.ConsistentRegionConfig in project streamsx.topology by IBMStreams.

the class ConsistentRegionConfigTest method testDefaultOpDriven.

@Test
public void testDefaultOpDriven() {
    ConsistentRegionConfig config = operatorDriven();
    checkCRC(config, Trigger.OPERATOR_DRIVEN, -1, 180, 180, 5);
}
Also used : ConsistentRegionConfig(com.ibm.streamsx.topology.consistent.ConsistentRegionConfig) Test(org.junit.Test)

Example 8 with ConsistentRegionConfig

use of com.ibm.streamsx.topology.consistent.ConsistentRegionConfig in project streamsx.topology by IBMStreams.

the class ConsistentRegionConfigTest method testDefaultPeriodNew.

@Test
public void testDefaultPeriodNew() {
    ConsistentRegionConfig config = new ConsistentRegionConfig(39);
    checkCRC(config, Trigger.PERIODIC, 39, 180, 180, 5);
}
Also used : ConsistentRegionConfig(com.ibm.streamsx.topology.consistent.ConsistentRegionConfig) Test(org.junit.Test)

Example 9 with ConsistentRegionConfig

use of com.ibm.streamsx.topology.consistent.ConsistentRegionConfig in project streamsx.topology by IBMStreams.

the class ConsistentRegionConfigTest method testChangeAll.

@Test
public void testChangeAll() {
    ConsistentRegionConfig config = operatorDriven().maxConsecutiveResetAttempts(11).drainTimeout(32).resetTimeout(200);
    checkCRC(config, Trigger.OPERATOR_DRIVEN, -1, 32, 200, 11);
}
Also used : ConsistentRegionConfig(com.ibm.streamsx.topology.consistent.ConsistentRegionConfig) Test(org.junit.Test)

Example 10 with ConsistentRegionConfig

use of com.ibm.streamsx.topology.consistent.ConsistentRegionConfig in project streamsx.topology by IBMStreams.

the class ConsistentRegionConfigTest method testEquals.

@Test
public void testEquals() {
    assertFalse(operatorDriven().equals(periodic(2)));
    assertEquals(operatorDriven(), new ConsistentRegionConfig());
    assertEquals(periodic(7), new ConsistentRegionConfig(7));
    assertEquals(operatorDriven(), operatorDriven());
    assertEquals(periodic(9), periodic(9));
    assertFalse(operatorDriven().equals(operatorDriven().drainTimeout(15)));
    assertFalse(operatorDriven().equals(operatorDriven().resetTimeout(16)));
    assertFalse(operatorDriven().equals(operatorDriven().maxConsecutiveResetAttempts(17)));
    assertFalse(periodic(9).equals(periodic(11)));
}
Also used : ConsistentRegionConfig(com.ibm.streamsx.topology.consistent.ConsistentRegionConfig) Test(org.junit.Test)

Aggregations

ConsistentRegionConfig (com.ibm.streamsx.topology.consistent.ConsistentRegionConfig)12 Test (org.junit.Test)11 StreamSchema (com.ibm.streams.operator.StreamSchema)2 Type (com.ibm.streams.operator.Type)2 Topology (com.ibm.streamsx.topology.Topology)2 ConsistentRegionConfig.periodic (com.ibm.streamsx.topology.consistent.ConsistentRegionConfig.periodic)2 SPL (com.ibm.streamsx.topology.spl.SPL)2 SPLStream (com.ibm.streamsx.topology.spl.SPLStream)2 TestTopology (com.ibm.streamsx.topology.test.TestTopology)2 Condition (com.ibm.streamsx.topology.tester.Condition)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 TimeUnit (java.util.concurrent.TimeUnit)2 Assert.assertNotNull (org.junit.Assert.assertNotNull)2 Assert.assertSame (org.junit.Assert.assertSame)2 Assume.assumeTrue (org.junit.Assume.assumeTrue)2 Before (org.junit.Before)2