Skip to content

Fix NetworkTest loopback parsing failure on Windows - #3903

Merged
shroffk merged 2 commits into
masterfrom
copilot/fix-core-pva-network-test
Aug 5, 2026
Merged

Fix NetworkTest loopback parsing failure on Windows#3903
shroffk merged 2 commits into
masterfrom
copilot/fix-core-pva-network-test

Conversation

Copilot AI commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

On Windows, NetworkInterface.getDisplayName() may return values like "Software Loopback Interface 1" which Network.parseAddress() cannot resolve via NetworkInterface.getByName(). This causes NetworkTest to fail on Windows despite the interface being valid.

Changes

  • NetworkTest.java: Wrap the parseAddress call using getDisplayName() in a try-catch; fall back to getName() (e.g., "lo") if parsing fails.
try {
    addr = Network.parseAddress("[ff02::42:1]:5099@" + lo.getDisplayName(), PVASettings.EPICS_PVA_BROADCAST_PORT);
} catch (Exception ex) {
    addr = Network.parseAddress("[ff02::42:1]:5099@" + lo.getName(), PVASettings.EPICS_PVA_BROADCAST_PORT);
}

Copilot AI linked an issue Aug 4, 2026 that may be closed by this pull request
Co-authored-by: shroffk <2111304+shroffk@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix the core-pva NetworkTest for Windows loopback interface Fix NetworkTest loopback parsing failure on Windows Aug 4, 2026
Copilot AI requested a review from shroffk August 4, 2026 13:22
@shroffk
shroffk requested a review from kasemir August 4, 2026 13:22
@shroffk
shroffk marked this pull request as ready for review August 4, 2026 13:23
@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

@shroffk
shroffk merged commit 8e7ca74 into master Aug 5, 2026
9 of 10 checks passed
@shroffk
shroffk deleted the copilot/fix-core-pva-network-test branch August 5, 2026 13:44
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.

Fix the core-pva NetworkTest

3 participants