Skip to content

Commit 764cc3e

Browse files
committed
Update test to explicitly pass on RPCError and explictly fail on ValueError
1 parent b6ac958 commit 764cc3e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,12 @@ async def test_method(
200200
rpc_call = getattr(target_service, method_name)
201201
try:
202202
await rpc_call(request, timeout=timedelta(milliseconds=1))
203-
except Exception as err:
203+
except ValueError as err:
204204
assert (
205205
"Unknown RPC call" not in str(err)
206206
), f"Unexpected unknown-RPC error for {target_service_name}.{method_name}: {err}"
207+
except temporalio.service.RPCError:
208+
pass
207209

208210
async def test_service(
209211
*, proto_module: FileDescriptor, proto_service: str, target_service_name: str

0 commit comments

Comments
 (0)