Skip to content

Commit fbc7f9e

Browse files
authored
ci: Refactor system tests with transport (#870)
* ci: Refactor system tests * add rest param * fix param name * remove rest
1 parent 271a46d commit fbc7f9e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/system.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ def project():
5050
yield default_project
5151

5252

53-
@pytest.fixture()
54-
def publisher():
55-
yield pubsub_v1.PublisherClient()
53+
@pytest.fixture(params=["grpc"])
54+
def publisher(request):
55+
yield pubsub_v1.PublisherClient(transport=request.param)
5656

5757

58-
@pytest.fixture()
59-
def subscriber():
60-
yield pubsub_v1.SubscriberClient()
58+
@pytest.fixture(params=["grpc"])
59+
def subscriber(request):
60+
yield pubsub_v1.SubscriberClient(transport=request.param)
6161

6262

6363
@pytest.fixture
@@ -419,8 +419,8 @@ def test_subscriber_not_leaking_open_sockets(
419419
# Also, since the client will get closed, we need another subscriber client
420420
# to clean up the subscription. We also need to make sure that auxiliary
421421
# subscriber releases the sockets, too.
422-
subscriber = pubsub_v1.SubscriberClient()
423-
subscriber_2 = pubsub_v1.SubscriberClient()
422+
subscriber = pubsub_v1.SubscriberClient(transport="grpc")
423+
subscriber_2 = pubsub_v1.SubscriberClient(transport="grpc")
424424
cleanup.append(
425425
(subscriber_2.delete_subscription, (), {"subscription": subscription_path})
426426
)

0 commit comments

Comments
 (0)