Skip to content

Commit 1cb4e0b

Browse files
committed
pool: fix flaky TestConnectionHandlerOpenUpdateClose
It's better to wait for a discovered event instead of deactivated to handle finish of a role update.
1 parent 12cdc0c commit 1cb4e0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

connection_pool/connection_pool_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ func TestConnectionHandlerOpenUpdateClose(t *testing.T) {
337337
for i := 0; i < 100; i++ {
338338
// Wait for read_only update, it should report about close connection
339339
// with old role.
340-
if h.deactivated >= 1 {
340+
if h.discovered >= 3 {
341341
break
342342
}
343343
time.Sleep(poolOpts.CheckTimeout)

0 commit comments

Comments
 (0)