Skip to content

Fix AliasName subcategory browse continuation#4040

Merged
marcschier merged 2 commits into
OPCFoundation:masterfrom
MrAlaskan:fix/aliasname-subcategory-browsenext
Jul 21, 2026
Merged

Fix AliasName subcategory browse continuation#4040
marcschier merged 2 commits into
OPCFoundation:masterfrom
MrAlaskan:fix/aliasname-subcategory-browsenext

Conversation

@MrAlaskan

Copy link
Copy Markdown
Contributor

Summary

This PR fixes AliasNameClient.EnumerateSubCategoriesAsync() so it follows OPC UA Browse continuation points until the server has returned every SubAliasNameCategories reference, and adds a regression test covering the paged browse case that was previously truncated after the first page.

Problem

EnumerateSubCategoriesAsync() is intended to expose the full set of sub-categories organized beneath an AliasNameCategoryType node. However, the previous implementation only issued a single BrowseAsync() call and immediately enumerated BrowseResult.References from that first response.

Under OPC UA, servers are allowed to split browse results across multiple pages and return a ContinuationPoint when the first response does not contain the full reference set. In that situation, the client must continue with BrowseNext until the continuation point is exhausted. Because this helper never consumed the returned continuation point, it silently dropped every sub-category that appeared after the first page.

Changes

  • Continue sub-category enumeration with BrowseNextAsync() whenever the initial BrowseAsync() response contains a non-empty continuation point.
  • Keep the existing filtering behavior so the helper still returns only AliasNameCategoryType references that can be resolved to local NodeId values.
  • Add scriptable Browse / BrowseNext support to the alias-name session test harness so paged browse behavior can be covered with a focused unit test.
  • Add a regression test that verifies EnumerateSubCategoriesAsync() returns sub-categories from both the initial browse response and the follow-up BrowseNext response.

@marcschier marcschier added the ready Ready to merge once CI Passes label Jul 19, 2026
@marcschier

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.55%. Comparing base (84fa8e8) to head (9a45a7f).
⚠️ Report is 16 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4040      +/-   ##
==========================================
- Coverage   73.85%   73.55%   -0.31%     
==========================================
  Files        1345     1345              
  Lines      179988   180056      +68     
  Branches    31668    31682      +14     
==========================================
- Hits       132938   132444     -494     
- Misses      36299    36907     +608     
+ Partials    10751    10705      -46     
Files with missing lines Coverage Δ
src/Opc.Ua.Client/AliasNames/AliasNameClient.cs 84.03% <100.00%> (+1.47%) ⬆️

... and 49 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marcschier
marcschier merged commit ba1d5f0 into OPCFoundation:master Jul 21, 2026
209 of 210 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready Ready to merge once CI Passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants