Skip to content

Commit

Permalink
kgo tests: initialize admin client after env var parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
twmb committed Dec 31, 2023
1 parent 556e271 commit 1d92357
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/kgo/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -137,6 +132,10 @@ func init() {
}
}
}
adm, err = newTestClient()
if err != nil {
panic(fmt.Sprintf("unable to create admin client: %v", err))
}
}

func testClientOpts(opts ...Opt) []Opt {
Expand Down

0 comments on commit 1d92357

Please sign in to comment.