Skip to content

Commit a620827

Browse files
authored
Merge branch 'main' into andystaples-fix-management-payload-urls
2 parents 0247ca9 + c688368 commit a620827

6 files changed

Lines changed: 37 additions & 5 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
"""Shared markers for the Azure Functions Durable E2E suite."""
5+
6+
import pytest
7+
8+
9+
azurite_delayed_visibility = pytest.mark.skip(
10+
reason=(
11+
"Azurite intermittently fails to return queue messages after an initial "
12+
"visibility delay; see https://github.com/Azure/Azurite/issues/2343."
13+
),
14+
)

tests/azure-functions-durable/e2e/apps/dtask_style/history_export_routes.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
``configure_history_export`` time, so this route no longer binds a process-wide
1515
context. The route only builds an ``ExportHistoryClient`` for the job-management
1616
surface (create / get job). A local-filesystem writer sends exported history to
17-
``<app>/_export_output`` where the test can read it back.
17+
a temporary directory outside the function app where the test can read it back.
1818
"""
1919

2020
import json
21+
import tempfile
2122
from collections.abc import Mapping
2223
from datetime import datetime, timedelta, timezone
2324
from pathlib import Path
@@ -44,9 +45,11 @@
4445

4546
bp = df.Blueprint()
4647

47-
# Exported history is written under the app directory so the E2E test (running
48-
# on the same machine) can read it back and assert on the contents.
49-
EXPORT_ROOT = Path(__file__).parent / "_export_output"
48+
# Keep generated files outside the function app. Writing beneath the app root
49+
# triggers the Functions host's file watcher and restarts the host mid-suite.
50+
EXPORT_ROOT = (
51+
Path(tempfile.gettempdir()) / "durabletask-python-e2e" / "history-export"
52+
)
5053

5154

5255
class _FileSystemHistoryWriter:

tests/azure-functions-durable/e2e/test_dtask_entities_advanced_e2e.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
import pytest
1616

17+
from ._markers import azurite_delayed_visibility
18+
1719
pytestmark = pytest.mark.functions_e2e
1820

1921

@@ -80,6 +82,7 @@ def test_call_failing_entity_handled(dtask_app):
8082
assert status["output"]["caught"] is True
8183

8284

85+
@azurite_delayed_visibility
8386
def test_client_delayed_signal_is_deferred(dtask_app):
8487
key = f"client-delay-{int(time.time() * 1000)}"
8588
dtask_app.signal_entity("counter", key, "add", input=9, delay_seconds=3.0)
@@ -96,6 +99,7 @@ def test_client_delayed_signal_is_deferred(dtask_app):
9699
assert payload["state"] == 9
97100

98101

102+
@azurite_delayed_visibility
99103
def test_orchestration_delayed_signal_is_deferred(dtask_app):
100104
key = f"orch-delay-{int(time.time() * 1000)}"
101105
instance_id = dtask_app.start_orchestration("signal_counter_delayed", body=key)

tests/azure-functions-durable/e2e/test_dtask_patterns_e2e.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313

1414
import pytest
1515

16+
from ._markers import azurite_delayed_visibility
17+
1618
pytestmark = pytest.mark.functions_e2e
1719

1820

21+
@azurite_delayed_visibility
1922
def test_timer(dtask_app):
2023
instance_id = dtask_app.start_orchestration("timer_wait")
2124
status = dtask_app.wait_for_completion(instance_id)

tests/azure-functions-durable/e2e/test_dtask_scheduled_e2e.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313

1414
import pytest
1515

16-
pytestmark = pytest.mark.functions_e2e
16+
from ._markers import azurite_delayed_visibility
17+
18+
pytestmark = [
19+
pytest.mark.functions_e2e,
20+
azurite_delayed_visibility,
21+
]
1722

1823

1924
def test_scheduled_orchestration_fires_repeatedly(dtask_app):

tests/azure-functions-durable/e2e/test_v1_patterns_e2e.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313

1414
import pytest
1515

16+
from ._markers import azurite_delayed_visibility
17+
1618
pytestmark = pytest.mark.functions_e2e
1719

1820

21+
@azurite_delayed_visibility
1922
def test_timer(v1_app):
2023
instance_id = v1_app.start_orchestration("timer_wait")
2124
status = v1_app.wait_for_completion(instance_id)

0 commit comments

Comments
 (0)