-
Notifications
You must be signed in to change notification settings - Fork 10
Set up E2E testing infrastructure aligned with durabletask-python #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- 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>
Co-authored-by: YunchuWang <12449837+YunchuWang@users.noreply.github.com>
Co-authored-by: YunchuWang <12449837+YunchuWang@users.noreply.github.com>
There was a problem hiding this 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-gobinary 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 \ |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
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.
|
|
||
| // Read environment variables | ||
| const endpoint = process.env.ENDPOINT || "localhost:8080"; | ||
| const _taskHub = process.env.TASKHUB || "default"; |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
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.
| const _taskHub = process.env.TASKHUB || "default"; |
| taskHubClient.raiseOrchestrationEvent(id, "A", "a"); | ||
| taskHubClient.raiseOrchestrationEvent(id, "B", "b"); | ||
| taskHubClient.raiseOrchestrationEvent(id, "C", "c"); |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
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.
| 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"); |
Aligns E2E testing infrastructure with durabletask-python by using
durabletask-gosidecar for standard tests and DTS emulator for Azure-managed tests.Standard E2E Tests (
pr-validation.yaml)durabletask-go(port 4001)lint-and-unit-testsande2e-testsjobsAzure-managed E2E Tests (new)
dts-e2e-tests.yamlworkflow usingmcr.microsoft.com/dts/dts-emulator(port 8080)test/e2e-azuremanaged/orchestration.spec.tswith 9 testsscripts/test-e2e-azuremanaged.shfor local testingnpm scripts
Backend Alignment
durabletask-goOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.