From 19222bb54e9a42fa14789bac548f88e8324083f4 Mon Sep 17 00:00:00 2001 From: igalshilman Date: Wed, 7 Aug 2024 12:47:23 +0200 Subject: [PATCH] Enable two more e2e tests This commit enables two additional e2e tests. - UserErrors - CancelInvocation --- test-services/exclusions.yaml | 6 ------ test-services/services/cancel_test.py | 6 +++--- test-services/services/failing.py | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/test-services/exclusions.yaml b/test-services/exclusions.yaml index 449c1b2..48c6585 100644 --- a/test-services/exclusions.yaml +++ b/test-services/exclusions.yaml @@ -2,18 +2,12 @@ exclusions: "alwaysSuspending": - "dev.restate.sdktesting.tests.AwaitTimeout" - "dev.restate.sdktesting.tests.State" - - "dev.restate.sdktesting.tests.UserErrors" "default": - "dev.restate.sdktesting.tests.AwaitTimeout" - - "dev.restate.sdktesting.tests.CancelInvocation" - "dev.restate.sdktesting.tests.KafkaIngress" - "dev.restate.sdktesting.tests.State" - - "dev.restate.sdktesting.tests.UserErrors" "lazyState": - "dev.restate.sdktesting.tests.State" "singleThreadSinglePartition": - "dev.restate.sdktesting.tests.AwaitTimeout" - - "dev.restate.sdktesting.tests.CancelInvocation" - - "dev.restate.sdktesting.tests.KafkaIngress" - "dev.restate.sdktesting.tests.State" - - "dev.restate.sdktesting.tests.UserErrors" diff --git a/test-services/services/cancel_test.py b/test-services/services/cancel_test.py index 4264de1..ff7ebef 100644 --- a/test-services/services/cancel_test.py +++ b/test-services/services/cancel_test.py @@ -41,7 +41,7 @@ async def verify_test(ctx: ObjectContext) -> bool: return False return state - + blocking_service = VirtualObject("CancelTestBlockingService") @blocking_service.handler() @@ -58,6 +58,6 @@ async def block(ctx: ObjectContext, op: BlockingOperation): name, uncompleteable = ctx.awakeable() await uncompleteable -@blocking_service.handler(name="isUnblocked") -async def is_unblocked(ctx: ObjectContext): +@blocking_service.handler(name="isUnlocked") +async def is_unlocked(ctx: ObjectContext): return None diff --git a/test-services/services/failing.py b/test-services/services/failing.py index 75d964a..1a0fc5c 100644 --- a/test-services/services/failing.py +++ b/test-services/services/failing.py @@ -60,7 +60,7 @@ def side_effect(): async def terminally_failing_side_effect(ctx: ObjectContext): def side_effect(): - raise TerminalError(message="Terminally failing side effect") + raise TerminalError(message="failed side effect") await ctx.run("sideEffect", side_effect) raise ValueError("Should not reach here")