Skip to content

Commit f78ee91

Browse files
committed
only recreate client context in async version
1 parent 0fc60ba commit f78ee91

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

test/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,9 @@ def max_message_size_bytes(self):
860860

861861

862862
def recreate_client_context():
863+
if _IS_SYNC:
864+
# sync tests don't need to recreate a client context
865+
return
863866
global client_context
864867
teardown()
865868
client_context = ClientContext()

test/asynchronous/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,9 @@ async def max_message_size_bytes(self):
862862

863863

864864
async def recreate_client_context():
865+
if _IS_SYNC:
866+
# sync tests don't need to recreate a client context
867+
return
865868
global async_client_context
866869
await async_teardown()
867870
async_client_context = AsyncClientContext()

0 commit comments

Comments
 (0)