MCPcopy Create free account
hub / github.com/google/go-cloud / TestTopicCloseIsCalled

Function TestTopicCloseIsCalled

pubsub/pub_test.go:83–91  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestTopicCloseIsCalled(t *testing.T) {
84 ctx := context.Background()
85 dt := &funcTopic{}
86 topic := pubsub.NewTopic(dt, nil)
87 topic.Shutdown(ctx)
88 if !dt.closed {
89 t.Error("want Topic.Close to have been called")
90 }
91}

Callers

nothing calls this directly

Calls 2

ShutdownMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected