Source file src/net/http/internal/http2/synctest_test.go

     1  // Copyright 2025 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package http2_test
     6  
     7  import (
     8  	"testing"
     9  	"testing/synctest"
    10  )
    11  
    12  // synctestSubtest starts a subtest and runs f in a synctest bubble within it.
    13  func synctestSubtest(t *testing.T, name string, f func(*testing.T)) {
    14  	t.Helper()
    15  	t.Run(name, func(t *testing.T) {
    16  		synctest.Test(t, f)
    17  	})
    18  }
    19  

View as plain text