Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions samples/snippets/schema_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@

from _pytest.capture import CaptureFixture
from flaky import flaky
from google.api_core.exceptions import InternalServerError
from google.api_core.exceptions import NotFound
from google.cloud import pubsub_v1
from google.cloud.pubsub import PublisherClient, SchemaServiceClient, SubscriberClient
from google.cloud.pubsub import PublisherClient
from google.cloud.pubsub import SchemaServiceClient
from google.cloud.pubsub import SubscriberClient
from google.pubsub_v1.types import Encoding
import pytest

Expand Down Expand Up @@ -59,7 +62,7 @@ def avro_schema(

try:
schema_client.delete_schema(request={"name": avro_schema_path})
except NotFound:
except (NotFound, InternalServerError):
pass


Expand All @@ -73,7 +76,7 @@ def proto_schema(

try:
schema_client.delete_schema(request={"name": proto_schema_path})
except NotFound:
except (NotFound, InternalServerError):
pass


Expand Down