aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/export_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/http/export_test.go')
-rw-r--r--src/net/http/export_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/net/http/export_test.go b/src/net/http/export_test.go
index 7fc3546caa..00824e754c 100644
--- a/src/net/http/export_test.go
+++ b/src/net/http/export_test.go
@@ -100,6 +100,24 @@ func (t *Transport) IdleConnStrsForTesting() []string {
return ret
}
+func (t *Transport) IdleConnStrsForTesting_h2() []string {
+ var ret []string
+ noDialPool := t.h2transport.ConnPool.(http2noDialClientConnPool)
+ pool := noDialPool.http2clientConnPool
+
+ pool.mu.Lock()
+ defer pool.mu.Unlock()
+
+ for k, cc := range pool.conns {
+ for range cc {
+ ret = append(ret, k)
+ }
+ }
+
+ sort.Strings(ret)
+ return ret
+}
+
func (t *Transport) IdleConnCountForTesting(cacheKey string) int {
t.idleMu.Lock()
defer t.idleMu.Unlock()