Skip to content

Commit

Permalink
USMON-1152: Remove Kafka monitor tests optimization (#29143)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielLavie authored Sep 9, 2024
1 parent ba54a8d commit e6c04b1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/network/usm/kafka_monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,19 +529,17 @@ func (s *KafkaProtocolParsingSuite) testKafkaProtocolParsing(t *testing.T, tls b
require.NoError(t, proxy.WaitForConnectionReady(unixPath))

cfg := getDefaultTestConfiguration(tls)
monitor := newKafkaMonitor(t, cfg)
if tls && cfg.EnableGoTLSSupport {
utils.WaitForProgramsToBeTraced(t, "go-tls", proxyProcess.Process.Pid, utils.ManualTracingFallbackEnabled)
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Cleanup(func() {
for _, client := range tt.context.clients {
client.Client.Close()
}
cleanProtocolMaps(t, "kafka", monitor.ebpfProgram.Manager.Manager)
})

monitor := newKafkaMonitor(t, cfg)
if tls && cfg.EnableGoTLSSupport {
utils.WaitForProgramsToBeTraced(t, "go-tls", proxyProcess.Process.Pid, utils.ManualTracingFallbackEnabled)
}
tt.testBody(t, &tt.context, monitor)
})
}
Expand Down

0 comments on commit e6c04b1

Please sign in to comment.