MCPcopy Create free account
hub / github.com/DoNewsCode/core / TestMain

Function TestMain

otkafka/setup_test.go:12–17  ·  view source on GitHub ↗
(m *testing.M)

Source from the content-addressed store, hash-verified

10)
11
12func TestMain(m *testing.M) {
13 if os.Getenv("KAFKA_ADDR") != "" {
14 setupTopic(os.Getenv("KAFKA_ADDR"))
15 }
16 os.Exit(m.Run())
17}
18
19func setupTopic(addr string) {
20 topics := []string{"trace", "test", "example"}

Callers

nothing calls this directly

Calls 2

setupTopicFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected