Skip to content

Commit 56bc541

Browse files
committed
fix cloud tests
1 parent 9cbdb1f commit 56bc541

5 files changed

Lines changed: 46 additions & 4 deletions

File tree

examples/examples-catalog.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,17 @@
221221
},
222222
"path": "./src/parallel/parallel.py"
223223
},
224+
{
225+
"name": "Parallel Operations",
226+
"description": "Executing multiple durable operations in parallel",
227+
"handler": "parallel.handler",
228+
"integration": true,
229+
"durableConfig": {
230+
"RetentionPeriodInDays": 7,
231+
"ExecutionTimeout": 300
232+
},
233+
"path": "./src/parallel/parallel.py"
234+
},
224235
{
225236
"name": "Map Operations",
226237
"description": "Processing collections using map-like durable operations",
@@ -232,6 +243,17 @@
232243
},
233244
"path": "./src/map/map_operations.py"
234245
},
246+
{
247+
"name": "Map Operations Flat",
248+
"description": "Processing collections using map-like durable operations in FLAT mode",
249+
"handler": "map_operations_flat.handler",
250+
"integration": true,
251+
"durableConfig": {
252+
"RetentionPeriodInDays": 7,
253+
"ExecutionTimeout": 300
254+
},
255+
"path": "./src/map/map_operations_flat.py"
256+
},
235257
{
236258
"name": "Map Large Scale",
237259
"description": "Processing collections using map-like durable operations in large scale",

examples/template.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,24 @@
420420
}
421421
}
422422
},
423+
"MapOperationsFlat": {
424+
"Type": "AWS::Serverless::Function",
425+
"Properties": {
426+
"CodeUri": "build/",
427+
"Handler": "map_operations_flat.handler",
428+
"Description": "Processing collections using map-like durable operations in FLAT mode",
429+
"Role": {
430+
"Fn::GetAtt": [
431+
"DurableFunctionRole",
432+
"Arn"
433+
]
434+
},
435+
"DurableConfig": {
436+
"RetentionPeriodInDays": 7,
437+
"ExecutionTimeout": 300
438+
}
439+
}
440+
},
423441
"MapWithLargeScale": {
424442
"Type": "AWS::Serverless::Function",
425443
"Properties": {

examples/test/map/test_map_operations_flat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
@pytest.mark.example
1212
@pytest.mark.durable_execution(
1313
handler=map_operations_flat.handler,
14-
lambda_function_name="map operations",
14+
lambda_function_name="Map Operations Flat",
1515
)
1616
def test_map_operations_flat(durable_runner):
1717
"""Test map_operations example using context.map()."""

examples/test/parallel/test_parallel.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44
from aws_durable_execution_sdk_python.execution import InvocationStatus
5-
from aws_durable_execution_sdk_python.lambda_service import OperationStatus
5+
from aws_durable_execution_sdk_python.lambda_service import OperationStatus, OperationType
66

77
from src.parallel import parallel
88
from test.conftest import deserialize_operation_payload
@@ -35,4 +35,5 @@ def test_parallel(durable_runner):
3535

3636
# Verify all children succeeded
3737
for child in parallel_op.child_operations:
38+
assert child.operation_type == OperationType.CONTEXT
3839
assert child.status is OperationStatus.SUCCEEDED

examples/test/parallel/test_parallel_flat.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44
from aws_durable_execution_sdk_python.execution import InvocationStatus
5-
from aws_durable_execution_sdk_python.lambda_service import OperationStatus
5+
from aws_durable_execution_sdk_python.lambda_service import OperationStatus, OperationType
66

77
from src.parallel import parallel_flat
88
from test.conftest import deserialize_operation_payload
@@ -11,7 +11,7 @@
1111
@pytest.mark.example
1212
@pytest.mark.durable_execution(
1313
handler=parallel_flat.handler,
14-
lambda_function_name="Parallel Operations",
14+
lambda_function_name="Parallel Operations Flat",
1515
)
1616
def test_parallel_flat(durable_runner):
1717
"""Test parallel example using context.parallel()."""
@@ -35,4 +35,5 @@ def test_parallel_flat(durable_runner):
3535

3636
# Verify all children succeeded
3737
for child in parallel_op.child_operations:
38+
assert child.operation_type != OperationType.CONTEXT
3839
assert child.status is OperationStatus.SUCCEEDED

0 commit comments

Comments
 (0)