Skip to content

Commit 766d37c

Browse files
committed
add test for reconnection
1 parent 1a47397 commit 766d37c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/integration/grpc_management_plane_api_test.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,14 @@ func TestGrpc_Reconnection(t *testing.T) {
200200
startErr := mockManagementPlaneGrpcContainer.Start(ctx)
201201
require.NoError(t, startErr)
202202

203-
ipAddress, err := mockManagementPlaneGrpcContainer.Host(ctx)
204-
require.NoError(t, err)
205-
ports, err := mockManagementPlaneGrpcContainer.Ports(ctx)
206-
require.NoError(t, err)
207-
mockManagementPlaneAPIAddress = net.JoinHostPort(ipAddress, ports["9093/tcp"][0].HostPort)
203+
//ipAddress, err := mockManagementPlaneGrpcContainer.Host(ctx)
204+
//require.NoError(t, err)
205+
//ports, err := mockManagementPlaneGrpcContainer.Ports(ctx)
206+
//require.NoError(t, err)
207+
//mockManagementPlaneAPIAddress = net.JoinHostPort(ipAddress, ports["9093/tcp"][0].HostPort)
208+
209+
time.Sleep(10 * time.Second)
210+
208211
currentID := verifyConnection(t, 2)
209212
assert.Equal(t, originalID, currentID)
210213
}
@@ -225,7 +228,6 @@ func verifyConnection(t *testing.T, instancesLength int) string {
225228
client := resty.New()
226229
client.SetRetryCount(retryCount).SetRetryWaitTime(retryWaitTime).SetRetryMaxWaitTime(retryMaxWaitTime)
227230

228-
t.Logf("-------- mockManagementPlaneAPIAddress: %s", mockManagementPlaneAPIAddress)
229231
url := fmt.Sprintf("http://%s/api/v1/connection", mockManagementPlaneAPIAddress)
230232
resp, err := client.R().EnableTrace().Get(url)
231233

0 commit comments

Comments
 (0)