Skip to content

Commit 15f9ced

Browse files
freeznetCopilot
andauthored
Update pkg/mcp/internal/testutil/pulsar.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 505853f commit 15f9ced

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/mcp/internal/testutil/pulsar.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,12 @@ func (h *PulsarTestHelper) CreateTopic(ctx context.Context, topic string, partit
141141
func (h *PulsarTestHelper) TopicExists(ctx context.Context, topic string) (bool, error) {
142142
topicName, err := utils.GetTopicName(topic)
143143
if err != nil {
144-
return false, nil
144+
return false, fmt.Errorf("invalid topic name %s: %w", topic, err)
145145
}
146146

147147
_, err = h.adminClient.Topics().GetMetadata(*topicName)
148148
if err != nil {
149-
return false, nil // Assume doesn't exist
149+
return false, fmt.Errorf("failed to get metadata for topic %s: %w", topic, err)
150150
}
151151
return true, nil
152152
}

0 commit comments

Comments
 (0)