use of org.neo4j.kernel.ha.SlaveUpdatePuller in project neo4j by neo4j.
the class UpdatePullerSwitcherTest method setUp.
@Before
public void setUp() {
@SuppressWarnings("unchecked") DelegateInvocationHandler<UpdatePuller> invocationHandler = mock(DelegateInvocationHandler.class);
PullerFactory pullerFactory = mock(PullerFactory.class);
slaveUpdatePuller = mock(SlaveUpdatePuller.class);
when(pullerFactory.createSlaveUpdatePuller()).thenReturn(slaveUpdatePuller);
when(invocationHandler.setDelegate(slaveUpdatePuller)).thenReturn(slaveUpdatePuller);
modeSwitcher = new UpdatePullerSwitcher(invocationHandler, pullerFactory);
}
use of org.neo4j.kernel.ha.SlaveUpdatePuller in project neo4j by neo4j.
the class UpdatePullerSwitcherTest method slaveUpdatePuller.
@Test
public void slaveUpdatePuller() throws Throwable {
UpdatePuller updatePuller = modeSwitcher.getSlaveImpl();
assertSame(slaveUpdatePuller, updatePuller);
verifyZeroInteractions(slaveUpdatePuller);
}
Aggregations