Skip to content

Commit

Permalink
Merge pull request #492 from dimastbk/add-test
Browse files Browse the repository at this point in the history
add test for DEADLINE_EXCEEDED
  • Loading branch information
dimastbk authored Sep 26, 2024
2 parents bed8bf6 + 93c89ed commit 7172743
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/unit/grpc_internals/zeebe_adapter_base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from pyzeebe.errors import (
ZeebeBackPressureError,
ZeebeDeadlineExceeded,
ZeebeGatewayUnavailableError,
ZeebeInternalError,
)
Expand Down Expand Up @@ -35,6 +36,11 @@ async def test_raises_back_pressure_error_on_resource_exhausted(self, zeebe_adap
with pytest.raises(ZeebeBackPressureError):
await zeebe_adapter._handle_grpc_error(error)

async def test_raises_deadline_exceeded_on_deadline_exceeded(self, zeebe_adapter: ZeebeAdapterBase):
error = grpc.aio.AioRpcError(grpc.StatusCode.DEADLINE_EXCEEDED, None, None)
with pytest.raises(ZeebeDeadlineExceeded):
await zeebe_adapter._handle_grpc_error(error)

async def test_raises_gateway_unavailable_on_unavailable_status(
self,
zeebe_adapter: ZeebeAdapterBase,
Expand Down

0 comments on commit 7172743

Please sign in to comment.