"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tc-messaging/src/test/java/com/tc/object/msg/ClientHandshakeMessageImplTest.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.

ClientHandshakeMessageImplTest.java  (terracotta-core-5.7.0):ClientHandshakeMessageImplTest.java  (terracotta-core-5.7.1)
skipping to change at line 54 skipping to change at line 54
@Test @Test
public void testGetResendMessages() throws Exception { public void testGetResendMessages() throws Exception {
MessageChannel channel = mock(MessageChannel.class); MessageChannel channel = mock(MessageChannel.class);
TCSocketAddress socket = new TCSocketAddress(65432); TCSocketAddress socket = new TCSocketAddress(65432);
when(channel.getLocalAddress()).thenReturn(socket); when(channel.getLocalAddress()).thenReturn(socket);
ClientHandshakeMessageImpl chm = new ClientHandshakeMessageImpl(mock(Ses sionID.class), mock(MessageMonitor.class), ClientHandshakeMessageImpl chm = new ClientHandshakeMessageImpl(mock(Ses sionID.class), mock(MessageMonitor.class),
new TCByteBufferOutputStream(), channel, TCMessageType.CLIENT_HA NDSHAKE_MESSAGE); new TCByteBufferOutputStream(), channel, TCMessageType.CLIENT_HA NDSHAKE_MESSAGE);
ResendVoltronEntityMessage msg1 = new ResendVoltronEntityMessage(mock(Cl ientID.class), new TransactionID(1), ResendVoltronEntityMessage msg1 = new ResendVoltronEntityMessage(mock(Cl ientID.class), new TransactionID(1),
mock(EntityDescriptor.class), VoltronEntityMessage.Type.FETCH_EN TITY, false, TCByteBufferFactory.getInstance(false, 0), mock(TransactionID.class )); mock(EntityDescriptor.class), VoltronEntityMessage.Type.FETCH_EN TITY, false, TCByteBufferFactory.getInstance(false, 0));
ResendVoltronEntityMessage msg2 = new ResendVoltronEntityMessage(mock(Cl ientID.class), new TransactionID(10), ResendVoltronEntityMessage msg2 = new ResendVoltronEntityMessage(mock(Cl ientID.class), new TransactionID(10),
mock(EntityDescriptor.class), VoltronEntityMessage.Type.CREATE_E NTITY, false, TCByteBufferFactory.getInstance(false, 0), mock(TransactionID.clas s)); mock(EntityDescriptor.class), VoltronEntityMessage.Type.CREATE_E NTITY, false, TCByteBufferFactory.getInstance(false, 0));
ResendVoltronEntityMessage msg3 = new ResendVoltronEntityMessage(mock(Cl ientID.class), new TransactionID(40), ResendVoltronEntityMessage msg3 = new ResendVoltronEntityMessage(mock(Cl ientID.class), new TransactionID(40),
mock(EntityDescriptor.class), VoltronEntityMessage.Type.DESTROY_ ENTITY, false, TCByteBufferFactory.getInstance(false, 0), mock(TransactionID.cla ss)); mock(EntityDescriptor.class), VoltronEntityMessage.Type.DESTROY_ ENTITY, false, TCByteBufferFactory.getInstance(false, 0));
chm.addResendMessage(msg3); chm.addResendMessage(msg3);
chm.addResendMessage(msg2); chm.addResendMessage(msg2);
chm.addResendMessage(msg1); chm.addResendMessage(msg1);
Assert.assertThat("resend transactions are out of order", chm.getResendM essages().toArray(new ResendVoltronEntityMessage[3]), Assert.assertThat("resend transactions are out of order", chm.getResendM essages().toArray(new ResendVoltronEntityMessage[3]),
equalTo(new ResendVoltronEntityMessage[] { msg1, msg2, msg3 })); equalTo(new ResendVoltronEntityMessage[] { msg1, msg2, msg3 }));
} }
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

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