Exemple #1
0
def test_delete(client, topic):
    publisher.delete_topic(PROJECT, TOPIC)

    @eventually_consistent.call
    def _():
        with pytest.raises(Exception):
            client.get_topic(client.topic_path(PROJECT, TOPIC))
def test_delete(client, topic):
    publisher.delete_topic(PROJECT, TOPIC)

    @eventually_consistent.call
    def _():
        with pytest.raises(Exception):
            client.get_topic(client.topic_path(PROJECT, TOPIC))
def test_delete(test_topic):
    test_topic.create()

    publisher.delete_topic(test_topic.name)

    @eventually_consistent.call
    def _():
        assert not test_topic.exists()
Exemple #4
0
def test_delete(client, topic_admin):
    publisher.delete_topic(PROJECT, TOPIC_ADMIN)

    @backoff.on_exception(backoff.expo, AssertionError, max_time=60)
    def eventually_consistent_test():
        with pytest.raises(Exception):
            client.get_topic(client.topic_path(PROJECT, TOPIC_ADMIN))

    eventually_consistent_test()
def test_delete(publisher_client: pubsub_v1.PublisherClient) -> None:
    publisher.delete_topic(PROJECT_ID, TOPIC_ID)

    @backoff.on_exception(backoff.expo, AssertionError, max_time=MAX_TIME)
    def eventually_consistent_test() -> None:
        with pytest.raises(Exception):
            publisher_client.get_topic(
                request={
                    "topic": publisher_client.topic_path(PROJECT_ID, TOPIC_ID)
                })

    eventually_consistent_test()