Skip to content

[AzureServiceFabric provider] Fix net48 test assembly binding issues and HttpClient mock#1370

Merged
shankarsama merged 1 commit into
Azure:mainfrom
shankarsama:servicefabric-fix-net48-test-bindings
Jun 19, 2026
Merged

[AzureServiceFabric provider] Fix net48 test assembly binding issues and HttpClient mock#1370
shankarsama merged 1 commit into
Azure:mainfrom
shankarsama:servicefabric-fix-net48-test-bindings

Conversation

@shankarsama

Copy link
Copy Markdown
Member
  • Add binding redirects for revision-number mismatches in both SF test projects (Microsoft.Extensions.Logging.Abstractions, System.Diagnostics.DiagnosticSource, System.Memory, System.Threading.Tasks.Extensions, Castle.Core, Newtonsoft.Json)
  • Fix HttpClient mock in FunctionalTests: mock HttpMessageHandler.SendAsync instead of non-virtual HttpClient.PutAsync
  • Add AzureServiceFabricTests.md with local test setup instructions

Copilot AI review requested due to automatic review settings June 19, 2026 19:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 targets improved reliability for the Azure Service Fabric provider’s net48 test runs by addressing assembly binding redirect issues, correcting the HttpClient mocking approach in an integration test, and documenting local test setup steps.

Changes:

  • Adds/updates binding redirects intended to resolve net48 assembly version/revision mismatches in Service Fabric test projects.
  • Fixes an integration test to mock HttpMessageHandler.SendAsync (instead of non-virtual HttpClient methods).
  • Adds local execution documentation for Service Fabric unit + integration tests.

Reviewed changes

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

File Description
Test/DurableTask.AzureServiceFabric.Tests/App.config Adds binding redirects (but currently under legacy Test/ tree, not the active solution test project).
test/DurableTask.AzureServiceFabric.Integration.Tests/FunctionalTests.cs Updates HttpClient mocking to use HttpMessageHandler + Moq.Protected.
test/DurableTask.AzureServiceFabric.Integration.Tests/App.config Adds additional binding redirects for net48 integration tests.
Test/AzureServiceFabricTests.md Adds documentation for running Service Fabric tests locally.

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

Comment thread test/DurableTask.AzureServiceFabric.Tests/App.config
Comment thread test/DurableTask.AzureServiceFabric.Integration.Tests/App.config
Comment thread Test/AzureServiceFabricTests.md Outdated
- Add binding redirects for revision-number mismatches in both SF test projects
  (Microsoft.Extensions.Logging.Abstractions, System.Diagnostics.DiagnosticSource,
  System.Memory, System.Threading.Tasks.Extensions, Castle.Core, Newtonsoft.Json)
- Fix HttpClient mock in FunctionalTests: mock HttpMessageHandler.SendAsync
  instead of non-virtual HttpClient.PutAsync
- Add AzureServiceFabricTests.md with local test setup instructions
- Update Newtonsoft.Json redirect to 13.0.0.0 (matching Directory.Packages.props)
- Place all new files under active test/ directory (not legacy Test/)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@shankarsama shankarsama force-pushed the servicefabric-fix-net48-test-bindings branch from 00f4b72 to 054bd5b Compare June 19, 2026 19:26

@AnatoliB AnatoliB left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@shankarsama shankarsama merged commit 990a4c9 into Azure:main Jun 19, 2026
45 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.

3 participants