Search in sources :

Example 6 with HeartEvent

use of com.alibaba.otter.shared.communication.core.model.heart.HeartEvent in project otter by alibaba.

the class DubboConnectionTest method testSingle.

@Test
public void testSingle() {
    CommunicationConnectionFactory factory = new DubboCommunicationConnectionFactory();
    CommunicationParam param = new CommunicationParam();
    param.setIp("127.0.0.1");
    param.setPort(2088);
    CommunicationConnection connection = factory.createConnection(param);
    Object result = connection.call(new HeartEvent());
    want.object(result).notNull();
}
Also used : CommunicationConnection(com.alibaba.otter.shared.communication.core.impl.connection.CommunicationConnection) HeartEvent(com.alibaba.otter.shared.communication.core.model.heart.HeartEvent) CommunicationParam(com.alibaba.otter.shared.communication.core.model.CommunicationParam) DubboCommunicationConnectionFactory(com.alibaba.otter.shared.communication.core.impl.dubbo.DubboCommunicationConnectionFactory) CommunicationConnectionFactory(com.alibaba.otter.shared.communication.core.impl.connection.CommunicationConnectionFactory) DubboCommunicationConnectionFactory(com.alibaba.otter.shared.communication.core.impl.dubbo.DubboCommunicationConnectionFactory) Test(org.testng.annotations.Test)

Aggregations

HeartEvent (com.alibaba.otter.shared.communication.core.model.heart.HeartEvent)6 Test (org.testng.annotations.Test)5 CommunicationConnection (com.alibaba.otter.shared.communication.core.impl.connection.CommunicationConnection)2 CommunicationConnectionFactory (com.alibaba.otter.shared.communication.core.impl.connection.CommunicationConnectionFactory)2 CommunicationParam (com.alibaba.otter.shared.communication.core.model.CommunicationParam)2 CommunicationException (com.alibaba.otter.shared.communication.core.exception.CommunicationException)1 DubboCommunicationConnectionFactory (com.alibaba.otter.shared.communication.core.impl.dubbo.DubboCommunicationConnectionFactory)1 RmiCommunicationConnectionFactory (com.alibaba.otter.shared.communication.core.impl.rmi.RmiCommunicationConnectionFactory)1 Event (com.alibaba.otter.shared.communication.core.model.Event)1 Method (java.lang.reflect.Method)1