diff --git a/pkg/kgo/helpers_test.go b/pkg/kgo/helpers_test.go index 7cff717a..53399ab7 100644 --- a/pkg/kgo/helpers_test.go +++ b/pkg/kgo/helpers_test.go @@ -55,11 +55,6 @@ var ( func init() { var err error - adm, err = newTestClient() - if err != nil { - panic(fmt.Sprintf("unable to create admin client: %v", err)) - } - if n, _ := strconv.Atoi(os.Getenv("KGO_TEST_RF")); n > 0 { testrf = n } @@ -130,6 +125,10 @@ func init() { } } } + adm, err = newTestClient() + if err != nil { + panic(fmt.Sprintf("unable to create admin client: %v", err)) + } } func testClientOpts(opts ...Opt) []Opt {