Search in sources :

Example 6 with ConnectionMeta

use of com.alibaba.nacos.core.remote.ConnectionMeta in project nacos by alibaba.

the class RpcAckCallbackInitorOrCleanerTest method testInitAndCleaner.

@Test
public void testInitAndCleaner() {
    String connectId = "11";
    ConnectionMeta meta = new ConnectionMeta(connectId, "", "", 80, 80, "GRPC", "", "", new HashMap<>());
    Connection connection = new GrpcConnection(meta, null, null);
    RpcAckCallbackInitorOrCleaner initorOrCleaner = new RpcAckCallbackInitorOrCleaner();
    initorOrCleaner.clientConnected(connection);
    initorOrCleaner.clientDisConnected(connection);
}
Also used : GrpcConnection(com.alibaba.nacos.core.remote.grpc.GrpcConnection) GrpcConnection(com.alibaba.nacos.core.remote.grpc.GrpcConnection) Connection(com.alibaba.nacos.core.remote.Connection) ConnectionMeta(com.alibaba.nacos.core.remote.ConnectionMeta) Test(org.junit.Test)

Aggregations

Connection (com.alibaba.nacos.core.remote.Connection)6 ConnectionMeta (com.alibaba.nacos.core.remote.ConnectionMeta)6 Test (org.junit.Test)4 GrpcConnection (com.alibaba.nacos.core.remote.grpc.GrpcConnection)3 Payload (com.alibaba.nacos.api.grpc.auto.Payload)2 SampleResult (com.alibaba.nacos.config.server.model.SampleResult)2 StreamObserver (io.grpc.stub.StreamObserver)2 MockHttpServletRequestBuilder (org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder)2 ConfigChangeNotifyRequest (com.alibaba.nacos.api.config.remote.request.ConfigChangeNotifyRequest)1 ConnectResetRequest (com.alibaba.nacos.api.remote.request.ConnectResetRequest)1 ConnectionSetupRequest (com.alibaba.nacos.api.remote.request.ConnectionSetupRequest)1 HealthCheckRequest (com.alibaba.nacos.api.remote.request.HealthCheckRequest)1 RequestMeta (com.alibaba.nacos.api.remote.request.RequestMeta)1 HealthCheckResponse (com.alibaba.nacos.api.remote.response.HealthCheckResponse)1 Response (com.alibaba.nacos.api.remote.response.Response)1 TpsMonitorPoint (com.alibaba.nacos.core.remote.control.TpsMonitorPoint)1 ServerCallStreamObserver (io.grpc.stub.ServerCallStreamObserver)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1