"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dso-l2/src/test/java/com/tc/objectserver/entity/ActiveToPassiveReplicationTest.java" between
terracotta-core-5.7.0.tar.gz and terracotta-core-5.7.1.tar.gz

About: Terracotta - Clustering technology for Java ("Network Attached Memory", "Distributed Cache"). Source code of the server (5.x) core components.

ActiveToPassiveReplicationTest.java  (terracotta-core-5.7.0):ActiveToPassiveReplicationTest.java  (terracotta-core-5.7.1)
skipping to change at line 66 skipping to change at line 66
} }
@AfterClass @AfterClass
public static void tearDownClass() { public static void tearDownClass() {
} }
@Before @Before
public void setUp() { public void setUp() {
passive = mock(ServerID.class); passive = mock(ServerID.class);
ReplicationSender replicate = mock(ReplicationSender.class); ReplicationSender replicate = mock(ReplicationSender.class);
when(replicate.addPassive(any(NodeID.class), any(SessionID.class), anyInt(), any(SyncReplicationActivity.class))).thenReturn(Boolean.TRUE); when(replicate.addPassive(any(ServerID.class), any(SessionID.class), anyInt( ), any(SyncReplicationActivity.class))).thenReturn(Boolean.TRUE);
ConsistencyManager cmgr = mock(ConsistencyManager.class); ConsistencyManager cmgr = mock(ConsistencyManager.class);
when(cmgr.requestTransition(any(ServerMode.class), any(NodeID.class), any(Tr ansition.class))).thenReturn(Boolean.TRUE); when(cmgr.requestTransition(any(ServerMode.class), any(NodeID.class), any(Tr ansition.class))).thenReturn(Boolean.TRUE);
ProcessTransactionHandler pth = mock(ProcessTransactionHandler.class); ProcessTransactionHandler pth = mock(ProcessTransactionHandler.class);
when(pth.snapshotEntityList(any(Consumer.class))).thenReturn(Collections.emp tyList()); when(pth.snapshotEntityList(any(Consumer.class))).thenReturn(Collections.emp tyList());
replication = new ActiveToPassiveReplication(cmgr, pth, mock(EntityPersistor GroupManager grp = mock(GroupManager.class);
.class), replicate, mock(Sink.class), mock(GroupManager.class)); when(grp.isNodeConnected(any(NodeID.class))).thenReturn(Boolean.TRUE);
replication = new ActiveToPassiveReplication(cmgr, pth, mock(EntityPersistor
.class), replicate, mock(Sink.class), grp);
} }
@Test @Test
public void testNodeLeft() throws Exception { public void testNodeLeft() throws Exception {
replication.enterActiveState(Collections.emptySet()); replication.enterActiveState(Collections.emptySet());
replication.nodeJoined(passive); replication.nodeJoined(passive);
SyncReplicationActivity activity = mock(SyncReplicationActivity.class); SyncReplicationActivity activity = mock(SyncReplicationActivity.class);
when(activity.getActivityID()).thenReturn(SyncReplicationActivity.ActivityID .getNextID()); when(activity.getActivityID()).thenReturn(SyncReplicationActivity.ActivityID .getNextID());
replication.startPassiveSync(passive); replication.startPassiveSync(passive);
ActivePassiveAckWaiter ack = replication.replicateActivity(activity, replica tion.passives()); ActivePassiveAckWaiter ack = replication.replicateActivity(activity, replica tion.passives());
 End of changes. 2 change blocks. 
3 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)