mirror of
https://github.com/livekit/livekit.git
synced 2026-08-29 07:39:09 +00:00
chore: improve docker test shutdown reliability (#4576)
This commit is contained in:
@@ -75,7 +75,9 @@ func runRedis(t testing.TB) string {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Cleanup(func() {
|
||||
_ = c.Close(t.Context())
|
||||
// t.Context() is canceled before cleanup funcs run, so use a
|
||||
// non-canceled context to let the container stop/remove complete.
|
||||
_ = c.Close(context.Background())
|
||||
})
|
||||
addr := c.GetHostPort("6379/tcp")
|
||||
waitTCPPort(t, addr)
|
||||
|
||||
Reference in New Issue
Block a user