Skip to content

Commit 9e5579c

Browse files
committed
cover client reset in test
1 parent ac4a720 commit 9e5579c

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

coordinator/test/proxy_test.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,21 @@ func testProxyClient(t *testing.T) {
6969
// Note: This might be nil if the coordinator is not properly set up for proxy authentication
7070
// but the test validates that the Client method completes without panic
7171
assert.NotNil(t, client)
72-
assert.NotEmpty(t, client.Token())
73-
t.Logf("Client token: %s (%v)", client.Token(), client)
72+
token1 := client.Token()
73+
assert.NotEmpty(t, token1)
74+
t.Logf("Client token: %s (%v)", token1, client)
75+
76+
if !upCfg.CompatibileMode {
77+
time.Sleep(time.Second * 2)
78+
client.Reset()
79+
client = clientManager.ClientAsProxy(ctx)
80+
assert.NotNil(t, client)
81+
token2 := client.Token()
82+
assert.NotEmpty(t, token2)
83+
t.Logf("Client token (sec): %s (%v)", token2, client)
84+
assert.NotEqual(t, token1, token2, "token should not be identical")
85+
}
86+
7487
}
7588

7689
func testProxyHandshake(t *testing.T) {

0 commit comments

Comments
 (0)