Address WSS discovery review feedback and follow-up tests - #4178
Conversation
|
|
Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
ConfiguredEndpoint refreshed endpoint descriptions with a DiscoveryClient created only from EndpointConfiguration. That path did not receive the application certificate manager, so WSS discovery could not validate a server certificate trusted by the application before opening a session. Add an ApplicationConfiguration-aware endpoint refresh overload and use it from the default and channel-manager session paths. Preserve the existing overloads for compatibility. The application-aware DiscoveryClient now supplies the configured certificate validation for secure discovery transports while TCP and legacy callers retain their existing behavior. Specification: https://reference.opcfoundation.org/Core/Part6/v105/docs/7.5.3 Tests: UpdateFromServerWithNullApplicationConfigurationThrowsArgumentNullException (1 passed, net10.0) Tests: UpdateBeforeConnectUsesApplicationCertificateValidationAsync (1 passed, net10.0) Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
# Conflicts: # src/Opc.Ua.Core/Stack/Configuration/ConfiguredEndpoints.cs # tests/Opc.Ua.Core.Tests/Stack/Client/ConfiguredEndpointTests.cs Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
# Conflicts: # src/Opc.Ua.Core/Stack/Configuration/ConfiguredEndpoints.cs # tests/Opc.Ua.Core.Tests/Stack/Client/ConfiguredEndpointTests.cs Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
…tests Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR addresses prior review feedback around application-aware WSS discovery by fixing an async exception assertion in tests and cleaning up a small grammar issue in a discovery-URL comment.
Changes:
- Update the
ConfiguredEndpointTestsnull-configuration assertion to useAssert.ThrowsAsyncso the returned task is properly observed. - Fix grammar in an inline comment in
ConfiguredEndpoints.UpdateFromServerCoreAsyncrelated to discovery URL handling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/Opc.Ua.Core.Tests/Stack/Client/ConfiguredEndpointTests.cs | Switches the null ApplicationConfiguration validation test to Assert.ThrowsAsync for correct async exception testing. |
| src/Opc.Ua.Core/Stack/Configuration/ConfiguredEndpoints.cs | Minor grammar correction in a discovery URL comment within the server update path. |
Merged current |
Description
Addresses the review feedback for application-aware WSS discovery and incorporates the follow-up coverage from #4179.
ApplicationConfigurationvalidation withAssert.ThrowsAsync.ConfiguredEndpoint, then verify the selected transport profile and security mode.Related Issues
Checklist