Skip to content

Commit 60111b3

Browse files
committed
test: fix TestGracefulShutdownCloseConcurrent hang
We should release the lock even if connect fails. Part of #282
1 parent 0593018 commit 60111b3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

shutdown_test.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,12 @@ func TestGracefulShutdownCloseConcurrent(t *testing.T) {
418418

419419
// Do not wait till Tarantool register out watcher,
420420
// test everything is ok even on async.
421-
422-
conn := test_helpers.ConnectWithValidation(t, shtdnServer, shtdnClntOpts)
423-
defer conn.Close()
421+
conn, err := Connect(shtdnServer, shtdnClntOpts)
422+
if err != nil {
423+
t.Errorf("Failed to connect: %s", err)
424+
} else {
425+
defer conn.Close()
426+
}
424427

425428
// Wait till all connections created.
426429
srvToStop.Done()

0 commit comments

Comments
 (0)