Skip to content
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

Improve test reliability #3052

Merged
merged 3 commits into from
Feb 26, 2025
Merged

Improve test reliability #3052

merged 3 commits into from
Feb 26, 2025

Conversation

andystaples
Copy link
Contributor

Some of the old end to end tests have been failing intermittently, appears to be an issue with entity state retrieval timing. Add a small delay to hopefully improve reliability.

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation PR is ready to merge and referenced in pending_docs.md
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)
  • My changes do not require any extra work to be leveraged by OutOfProc SDKs
    • Otherwise: That work is being tracked here: #issue_or_pr_in_each_sdk
  • My changes do not change the version of the WebJobs.Extensions.DurableTask package
    • Otherwise: major or minor version updates are reflected in /src/Worker.Extensions.DurableTask/AssemblyInfo.cs
  • My changes do not add EventIds to our EventSource logs
    • Otherwise: Ensure the EventIds are within the supported range in our existing Windows infrastructure. You may validate this with a deployed app's telemetry. You may also extend the range by completing a PR such as this one.
  • My changes should be added to v2.x branch.
    • Otherwise: This change applies exclusively to WebJobs.Extensions.DurableTask v3.x. It will be retained only in the dev and main branches and will not be merged into the v2.x branch.

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
….com/Azure/azure-functions-durable-extension into andystaples/improve-test-reliability
@@ -3994,6 +3994,9 @@ public async Task DurableEntity_AsyncIO()
await client.SignalEntity(this.output, "get", "https://www.microsoft.com");
await client.SignalEntity(this.output, "get", "https://bing.com");

// Sleeping for a short time here appears to ensure that the state is fully updated before the read
Thread.Sleep(500);

var state = await client.WaitForEntityState<IDictionary<string, string>>(this.output, TimeSpan.FromSeconds(10));
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering, could the client.WaitForEntityState(...) API have been used to account for these delays?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was looking at this too... should have marked this PR as a draft, I was just using it to see if an artificial delay helps

@andystaples andystaples mentioned this pull request Feb 26, 2025
15 tasks
@nytian nytian merged commit 70c8584 into dev Feb 26, 2025
6 checks passed
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.

None yet

3 participants