Selaa lähdekoodia

http2: reset DebugGoroutines after testing it

Return DebugGoroutines to its original setting after
turning it on for the test.

Change-Id: I860f3b03d3736617657f124f957efe89fbe12104
Reviewed-on: https://go-review.googlesource.com/18070
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Jeff R. Allen 10 vuotta sitten
vanhempi
commit
6c89489caf
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      http2/gotrack_test.go

+ 3 - 0
http2/gotrack_test.go

@@ -11,7 +11,10 @@ import (
 )
 
 func TestGoroutineLock(t *testing.T) {
+	oldDebug := DebugGoroutines
 	DebugGoroutines = true
+	defer func() { DebugGoroutines = oldDebug }()
+
 	g := newGoroutineLock()
 	g.check()