mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Messaging facade: finished changing jgroups heartbeating over to facade.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@33886 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,6 +27,7 @@ import java.io.IOException;
|
||||
import java.io.ObjectOutput;
|
||||
import java.io.ObjectOutputStream;
|
||||
|
||||
import org.jgroups.Address;
|
||||
import org.jgroups.Channel;
|
||||
import org.jgroups.ChannelClosedException;
|
||||
import org.jgroups.ChannelNotConnectedException;
|
||||
@@ -102,6 +103,15 @@ public class JGroupsMessengerTest
|
||||
assertEquals(false, messenger.isConnected());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void canDelegateGetAddress()
|
||||
{
|
||||
Address address = Mockito.mock(Address.class);
|
||||
Mockito.when(address.toString()).thenReturn("an-address");
|
||||
Mockito.when(channel.getAddress()).thenReturn(address);
|
||||
assertEquals("an-address", messenger.getAddress());
|
||||
}
|
||||
|
||||
private byte[] serialize(String text) throws IOException
|
||||
{
|
||||
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
||||
|
Reference in New Issue
Block a user