Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Aligns E2E testing infrastructure with durabletask-python by using durabletask-go sidecar for standard tests and DTS emulator for Azure-managed tests.

Standard E2E Tests (pr-validation.yaml)

  • Replaced Docker-based sidecar with durabletask-go (port 4001)
  • Split into lint-and-unit-tests and e2e-tests jobs
  • Added Node.js matrix: 18.x, 20.x, 22.x
  • Updated to actions v4/v5

Azure-managed E2E Tests (new)

  • Added dts-e2e-tests.yaml workflow using mcr.microsoft.com/dts/dts-emulator (port 8080)
  • Created test/e2e-azuremanaged/orchestration.spec.ts with 9 tests
  • Added scripts/test-e2e-azuremanaged.sh for local testing

npm scripts

"test:e2e:azuremanaged:internal": "jest test/e2e-azuremanaged --runInBand --detectOpenHandles",
"test:e2e:azuremanaged": "./scripts/test-e2e-azuremanaged.sh"

Backend Alignment

Test Type Backend Port
Standard E2E durabletask-go 4001
Azure-managed DTS emulator 8080
Original prompt

refer to microsoft/durabletask-python repo given this context this is python testing backend setup 1. durabletask-go Sidecar (for standard E2E tests)
The standard E2E tests in tests/durabletask/ use the durabletask-go sidecar as the backend. From the test files and documentation:

Python

NOTE: These tests assume a sidecar process is running. Example command:

go install github.com/microsoft/durabletask-go@main

durabletask-go --port 4001

The tests communicate with this sidecar via gRPC on port 4001 by default.

  1. DTS (Durable Task Scheduler) Emulator (for Azure-managed tests)
    The Azure-managed tests in tests/durabletask-azuremanaged/ use the DTS emulator as a Docker container:

Python

NOTE: These tests assume a sidecar process is running. Example command:

docker run -i -p 8080:8080 -p 8082:8082 -d mcr.microsoft.com/dts/dts-emulator:latest

These tests use:

DurableTaskSchedulerClient and DurableTaskSchedulerWorker classes
Default endpoint: http://localhost:8080
Environment variables: ENDPOINT and TASKHUB
Communication Protocol
Both backends communicate using gRPC based on the protobuf definitions from microsoft/durabletask-protobuf. The Python SDK uses TaskHubGrpcWorker and TaskHubGrpcClient classes to interact with these sidecars.

set up durabletask-js e2e tests aligning with python testing setup. also check repos thoroughly to update or create ci/cd pipelines to include the e2e test if needed accordingly


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@YunchuWang YunchuWang changed the title [WIP] Add E2E testing backend setup for durabletask-python [WIP] Add E2E testing backend setup Jan 22, 2026
- Add Azure-managed tests directory (test/e2e-azuremanaged) with DTS emulator tests
- Add test script for running DTS emulator tests (scripts/test-e2e-azuremanaged.sh)
- Update package.json with new test scripts for Azure-managed E2E tests
- Update pr-validation.yaml to use durabletask-go sidecar (like Python SDK)
- Add dts-e2e-tests.yaml workflow for DTS emulator E2E tests
- Add documentation comments to existing E2E tests

Co-authored-by: YunchuWang <12449837+YunchuWang@users.noreply.github.com>
Copilot AI and others added 2 commits January 22, 2026 19:47
Co-authored-by: YunchuWang <12449837+YunchuWang@users.noreply.github.com>
Co-authored-by: YunchuWang <12449837+YunchuWang@users.noreply.github.com>
Copilot AI changed the title [WIP] Add E2E testing backend setup Set up E2E testing infrastructure aligned with durabletask-python Jan 22, 2026
Copilot AI requested a review from YunchuWang January 22, 2026 19:54
@torosent torosent requested a review from Copilot January 26, 2026 17:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR sets up E2E testing infrastructure for durabletask-js aligned with the durabletask-python approach, using durabletask-go sidecar for standard tests and DTS emulator for Azure-managed tests.

Changes:

  • Split CI workflow into separate lint/unit and E2E test jobs with Node.js 18.x, 20.x, 22.x matrix
  • Replaced Docker-based sidecar with durabletask-go binary in standard E2E tests (matching Python SDK approach)
  • Added new Azure-managed E2E test suite using DTS emulator container
  • Created supporting scripts and npm commands for local testing

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/e2e/orchestration.spec.ts Added documentation comments explaining the durabletask-go sidecar requirement and setup
test/e2e-azuremanaged/orchestration.spec.ts New Azure-managed test suite with 9 tests using DTS emulator (port 8080)
scripts/test-e2e.sh Updated comments to document alignment with Python SDK testing approach
scripts/test-e2e-azuremanaged.sh New script to run Azure-managed E2E tests locally with DTS emulator
package.json Added npm scripts for Azure-managed E2E tests
.github/workflows/pr-validation.yaml Refactored into separate jobs with Node.js matrix and durabletask-go sidecar
.github/workflows/dts-e2e-tests.yaml New workflow for DTS emulator E2E tests with Node.js matrix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

# run your container
echo "Starting DTS emulator"
docker run \
--name dts-emulator -d --rm \
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The container name used in the script is "dts-emulator" (with hyphen), but in the GitHub workflow file .github/workflows/dts-e2e-tests.yaml line 36, it's "dtsemulator" (no hyphen). While this won't cause issues in CI since the workflow doesn't call this script, it creates an inconsistency that could confuse developers and potentially cause issues if someone tries to use both. Standardize the container name across both files.

Copilot uses AI. Check for mistakes.

// Read environment variables
const endpoint = process.env.ENDPOINT || "localhost:8080";
const _taskHub = process.env.TASKHUB || "default";
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The _taskHub variable is declared but never used in the tests. Either remove this unused variable or pass it to the TaskHubGrpcClient and TaskHubGrpcWorker constructors if it should be used to configure the task hub name.

Suggested change
const _taskHub = process.env.TASKHUB || "default";

Copilot uses AI. Check for mistakes.
Comment on lines +172 to +174
taskHubClient.raiseOrchestrationEvent(id, "A", "a");
taskHubClient.raiseOrchestrationEvent(id, "B", "b");
taskHubClient.raiseOrchestrationEvent(id, "C", "c");
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The raiseOrchestrationEvent method is async and returns a Promise, but it's not being awaited here. This could lead to race conditions where events are raised before the orchestration is fully started, or the events might not be sent before the test proceeds to wait for completion. Add await to each raiseOrchestrationEvent call to ensure events are properly sent.

Suggested change
taskHubClient.raiseOrchestrationEvent(id, "A", "a");
taskHubClient.raiseOrchestrationEvent(id, "B", "b");
taskHubClient.raiseOrchestrationEvent(id, "C", "c");
await taskHubClient.raiseOrchestrationEvent(id, "A", "a");
await taskHubClient.raiseOrchestrationEvent(id, "B", "b");
await taskHubClient.raiseOrchestrationEvent(id, "C", "c");

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants