Skip to content

Commit

Permalink
fix(fvt): fresh metrics registry for each test
Browse files Browse the repository at this point in the history
Trying to nail down flakiness with the verification of metrics in these
tests. Since adding the additional versions these have been flakey and I
think the reason is that the registry is getting re-used between tests
as it is only created fresh on a call to NewConfig

Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
  • Loading branch information
dnwe committed Aug 21, 2023
1 parent 2b54832 commit d44ebdc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions functional_producer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -826,8 +826,10 @@ func testProducingMessages(t *testing.T, config *Config, minVersion KafkaVersion
name := t.Name() + "-v" + version.String()
t.Run(name, func(t *testing.T) {
config.ClientID = name
config.MetricRegistry = metrics.NewRegistry()
checkKafkaVersion(t, version.String())
config.Version = version

client, err := NewClient(FunctionalTestEnv.KafkaBrokerAddrs, config)
if err != nil {
t.Fatal(err)
Expand Down

0 comments on commit d44ebdc

Please sign in to comment.