use of io.aeron.RethrowingErrorHandler in project Aeron by real-logic.
the class ConsensusModuleContextTest method beforeEach.
@BeforeEach
void beforeEach() {
final Aeron.Context aeronContext = mock(Aeron.Context.class);
when(aeronContext.subscriberErrorHandler()).thenReturn(new RethrowingErrorHandler());
final AgentInvoker conductorInvoker = mock(AgentInvoker.class);
final Aeron aeron = mock(Aeron.class);
when(aeron.context()).thenReturn(aeronContext);
when(aeron.conductorAgentInvoker()).thenReturn(conductorInvoker);
context = new ConsensusModule.Context().clusterDir(clusterDir).aeron(aeron).errorCounter(mock(AtomicCounter.class)).ingressChannel("must be specified").replicationChannel("must be specified").moduleStateCounter(mock(Counter.class)).electionStateCounter(mock(Counter.class)).clusterNodeRoleCounter(mock(Counter.class)).commitPositionCounter(mock(Counter.class)).controlToggleCounter(mock(Counter.class)).snapshotCounter(mock(Counter.class)).timedOutClientCounter(mock(Counter.class));
}
use of io.aeron.RethrowingErrorHandler in project aeron by real-logic.
the class ConsensusModuleContextTest method beforeEach.
@BeforeEach
void beforeEach() {
final Aeron.Context aeronContext = mock(Aeron.Context.class);
when(aeronContext.subscriberErrorHandler()).thenReturn(new RethrowingErrorHandler());
final AgentInvoker conductorInvoker = mock(AgentInvoker.class);
final Aeron aeron = mock(Aeron.class);
when(aeron.context()).thenReturn(aeronContext);
when(aeron.conductorAgentInvoker()).thenReturn(conductorInvoker);
context = new ConsensusModule.Context().clusterDir(clusterDir).aeron(aeron).errorCounter(mock(AtomicCounter.class)).ingressChannel("must be specified").replicationChannel("must be specified").moduleStateCounter(mock(Counter.class)).electionStateCounter(mock(Counter.class)).clusterNodeRoleCounter(mock(Counter.class)).commitPositionCounter(mock(Counter.class)).controlToggleCounter(mock(Counter.class)).snapshotCounter(mock(Counter.class)).timedOutClientCounter(mock(Counter.class));
}
Aggregations