Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: clean up extra topics from snippet tests #324

Merged
merged 2 commits into from
Jun 15, 2021
Merged

Conversation

daniel-sanche
Copy link
Contributor

@daniel-sanche daniel-sanche commented Jun 15, 2021

Ths PR removes topics created in the snippet test project that weren't being properly cleaned up

Fixes: #323

@daniel-sanche daniel-sanche requested a review from a team as a code owner June 15, 2021 20:03
@daniel-sanche daniel-sanche requested review from tmatsuo and removed request for a team June 15, 2021 20:03
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 15, 2021
@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/python-logging API. label Jun 15, 2021
# create callback wrapper to delete topic when done
class TopicDeleter:
def delete(self):
client.delete_topic(request={"topic": topic_path})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: perhaps, worth adding a log line that topic X is deleted - for easier troubleshooting if tests fail in the future

@daniel-sanche daniel-sanche merged commit 663eaaa into master Jun 15, 2021
@daniel-sanche daniel-sanche deleted the delete-topics branch June 15, 2021 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/python-logging API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to clean up Pub/Sub topic resources during tests
2 participants