Skip to content

Commit 2d13963

Browse files
committed
test: make wait timeout assertions cross-platform
Signed-off-by: cyphercodes <cyphercodes@users.noreply.github.com>
1 parent 5468bed commit 2d13963

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/clients/test_dapr_grpc_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ def test_wait_timeout(self):
815815
dapr = DaprGrpcClient(f'localhost:{port}')
816816
with self.assertRaises(Exception) as context:
817817
dapr.wait(0.1)
818-
self.assertTrue('Connection refused' in str(context.exception))
818+
self.assertIsInstance(context.exception, ConnectionRefusedError)
819819

820820
def test_lock_acquire_success(self):
821821
dapr = DaprGrpcClient(f'{self.scheme}localhost:{self.grpc_port}')

tests/clients/test_dapr_grpc_client_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ async def test_wait_timeout(self):
799799
dapr = DaprGrpcClientAsync(f'{self.scheme}localhost:{port}')
800800
with self.assertRaises(Exception) as context:
801801
await dapr.wait(0.1)
802-
self.assertTrue('Connection refused' in str(context.exception))
802+
self.assertIsInstance(context.exception, ConnectionRefusedError)
803803

804804
async def test_lock_acquire_success(self):
805805
dapr = DaprGrpcClientAsync(f'{self.scheme}localhost:{self.grpc_port}')

0 commit comments

Comments
 (0)