Use "T.Cleanup()" instead of manually deferred shutdown function.

This commit is contained in:
Joachim Bauch
2022-04-05 12:57:40 +02:00
parent 81a52389aa
commit 2a491ec3f0
9 changed files with 99 additions and 166 deletions
+1 -2
View File
@@ -68,8 +68,7 @@ func Test_TransientData(t *testing.T) {
}
func Test_TransientMessages(t *testing.T) {
hub, _, _, server, shutdown := CreateHubForTest(t)
defer shutdown()
hub, _, _, server := CreateHubForTest(t)
ctx, cancel := context.WithTimeout(context.Background(), testTimeout)
defer cancel()