Search in sources :

Example 11 with Connection

use of com.alibaba.nacos.core.remote.Connection 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)11 ConnectionMeta (com.alibaba.nacos.core.remote.ConnectionMeta)6 Test (org.junit.Test)5 SampleResult (com.alibaba.nacos.config.server.model.SampleResult)4 Payload (com.alibaba.nacos.api.grpc.auto.Payload)3 GrpcConnection (com.alibaba.nacos.core.remote.grpc.GrpcConnection)3 HashMap (java.util.HashMap)3 MockHttpServletRequestBuilder (org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder)3 GetMapping (org.springframework.web.bind.annotation.GetMapping)3 ClientConfigMetricResponse (com.alibaba.nacos.api.config.remote.response.ClientConfigMetricResponse)2 RequestMeta (com.alibaba.nacos.api.remote.request.RequestMeta)2 Response (com.alibaba.nacos.api.remote.response.Response)2 StreamObserver (io.grpc.stub.StreamObserver)2 ArrayList (java.util.ArrayList)2 ClientConfigMetricRequest (com.alibaba.nacos.api.config.remote.request.ClientConfigMetricRequest)1 ConfigChangeNotifyRequest (com.alibaba.nacos.api.config.remote.request.ConfigChangeNotifyRequest)1 NacosException (com.alibaba.nacos.api.exception.NacosException)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