MCPcopy
hub / github.com/IBM/sarama / stopDockerTestBroker

Function stopDockerTestBroker

functional_test.go:324–333  ·  view source on GitHub ↗
(ctx context.Context, brokerID int32)

Source from the content-addressed store, hash-verified

322}
323
324func stopDockerTestBroker(ctx context.Context, brokerID int32) error {
325 service := fmt.Sprintf("kafka-%d", brokerID)
326 c := exec.Command("docker", "compose", "stop", service)
327 c.Stdout = os.Stdout
328 c.Stderr = os.Stderr
329 if err := c.Run(); err != nil {
330 return fmt.Errorf("failed to run docker compose to stop test broker kafka-%d: %w", brokerID, err)
331 }
332 return nil
333}
334
335func prepareTestTopics(ctx context.Context, env *testEnvironment) error {
336 Logger.Println("creating test topics")

Calls 2

RunMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected