Package org.opennms.core.ipc.twin.test
Class AbstractTwinBrokerIT
- java.lang.Object
-
- org.opennms.core.ipc.twin.test.AbstractTwinBrokerIT
-
public abstract class AbstractTwinBrokerIT extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractTwinBrokerIT.Tracker<T>
-
Field Summary
Fields Modifier and Type Field Description TwinPublisher
publisher
TwinSubscriber
subscriber
-
Constructor Summary
Constructors Constructor Description AbstractTwinBrokerIT()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TwinPublisher
createPublisher()
protected abstract TwinSubscriber
createSubscriber(MinionIdentity identity)
void
setup()
void
teardown()
void
testMultipleSubscribers()
Tests that multiple subscribers get the same update.void
testMultipleSubscription()
Tests that multiple subscriptions exists for the same key.void
testPublisherRestart()
Tests that subscription works if publisher gets restarted.void
testPublishSubscribe()
Tests that an object can be published and the same object can be received by the subscriber.void
testPublishSubscribeWithTrapdConfig()
void
testSubscribeBeforePublish()
Tests that a subscriber can register before a publisher exists.void
testSubscriberClose()
Tests that subscription can be closed and reopened.void
testSubscriberCloseBeforeRegister()
Tests that subscription can be closed before registration.void
testUpdates()
Tests that a publisher can update an object and the subscriber will receives all versions.
-
-
-
Field Detail
-
publisher
public TwinPublisher publisher
-
subscriber
public TwinSubscriber subscriber
-
-
Method Detail
-
createPublisher
protected abstract TwinPublisher createPublisher() throws Exception
- Throws:
Exception
-
createSubscriber
protected abstract TwinSubscriber createSubscriber(MinionIdentity identity) throws Exception
- Throws:
Exception
-
testPublishSubscribe
public void testPublishSubscribe() throws Exception
Tests that an object can be published and the same object can be received by the subscriber.- Throws:
Exception
-
testUpdates
public void testUpdates() throws Exception
Tests that a publisher can update an object and the subscriber will receives all versions.- Throws:
Exception
-
testSubscribeBeforePublish
public void testSubscribeBeforePublish() throws Exception
Tests that a subscriber can register before a publisher exists.- Throws:
Exception
-
testMultipleSubscription
public void testMultipleSubscription() throws Exception
Tests that multiple subscriptions exists for the same key.- Throws:
Exception
-
testMultipleSubscribers
public void testMultipleSubscribers() throws Exception
Tests that multiple subscribers get the same update.- Throws:
Exception
-
testPublisherRestart
public void testPublisherRestart() throws Exception
Tests that subscription works if publisher gets restarted.- Throws:
Exception
-
testSubscriberClose
public void testSubscriberClose() throws Exception
Tests that subscription can be closed and reopened.- Throws:
Exception
-
testSubscriberCloseBeforeRegister
public void testSubscriberCloseBeforeRegister() throws Exception
Tests that subscription can be closed before registration.- Throws:
Exception
-
testPublishSubscribeWithTrapdConfig
public void testPublishSubscribeWithTrapdConfig() throws IOException
- Throws:
IOException
-
-