mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-28 22:55:49 +08:00
# Description Updates every GitHub Actions workflow from `actions/setup-dotnet@v5` to `actions/setup-dotnet@v6` and fixes the net48 `UdpMessageRepeaterTests` hang observed in Azure build 15773. The hang dump showed NUnit blocked in `AsyncToSyncAdapter` waiting for an unfinished async test after virtual time advanced before the repeater registered its next delay timer. The tests now wait for each timer registration before advancing `FakeTimeProvider`, apply the same synchronization to cancellation coverage, and use real-time deadlines so regressions fail instead of hanging the test host. ## Related Issues - Replaces #4064 - Fixes the PubSub UDP net48 hang in [Azure build 15773](https://opcfoundation.visualstudio.com/865bd736-d0a6-4260-a336-d09d3eb39375/_build/results?buildId=15773) ## Testing - Exact PubSub UDP net48 pipeline selection: 175 passed, 4 skipped. - `UdpMessageRepeaterTests`: 30 consecutive net48 runs passed. - `UdpMessageRepeaterTests`: 10 passed on net10.0. ## Checklist - [x] I have signed the [CLA](https://opcfoundation.org/license/cla/ContributorLicenseAgreementv1.0.pdf) and read the [CONTRIBUTING](https://github.com/OPCFoundation/UA-.NETStandard/blob/master/CONTRIBUTING.md) doc. - [x] I have added tests that prove my fix is effective or that my feature works and increased code coverage. - [x] I have added all necessary documentation. - [x] I have verified that my changes do not introduce (new) build or analyzer warnings. - [ ] I ran **all** tests locally using the **UA.slnx** solution against at least .net **framework** and .net **10**, and all passed. - [ ] I fixed **all** failing and flaky tests in the CI pipelines and **all** CodeQL warnings. - [x] I have addressed **all** PR feedback received. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
81 lines
2.2 KiB
YAML
81 lines
2.2 KiB
YAML
name: Connection Stability Test
|
|
|
|
on:
|
|
schedule:
|
|
# Run nightly at 2:00 AM UTC
|
|
- cron: '0 2 * * *'
|
|
workflow_dispatch:
|
|
inputs:
|
|
duration:
|
|
description: 'Test duration in minutes'
|
|
required: false
|
|
default: '90'
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
stability-test:
|
|
name: Connection Stability Test
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 120 # Allow extra time beyond test duration for setup/teardown
|
|
|
|
env:
|
|
DOTNET_VERSION: '10.0.x'
|
|
TARGET_FRAMEWORK: 'net10.0'
|
|
CONFIGURATION: 'Release'
|
|
TEST_DURATION_MINUTES: ${{ github.event.inputs.duration || '90' }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup .NET ${{ env.DOTNET_VERSION }}
|
|
uses: actions/setup-dotnet@v6
|
|
with:
|
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
|
|
|
- name: Set Cloud Version
|
|
shell: pwsh
|
|
run: ./.azurepipelines/set-version.ps1
|
|
|
|
- name: Restore dependencies
|
|
run: dotnet restore 'UA.slnx'
|
|
|
|
- name: Build Client Tests
|
|
run: dotnet build ./tests/Opc.Ua.Client.Tests/Opc.Ua.Client.Tests.csproj --configuration ${{ env.CONFIGURATION }} --no-restore
|
|
|
|
- name: Run Connection Stability Test
|
|
run: |
|
|
echo "Starting connection stability test for $TEST_DURATION_MINUTES minutes"
|
|
dotnet test ./tests/Opc.Ua.Client.Tests/Opc.Ua.Client.Tests.csproj \
|
|
--configuration ${{ env.CONFIGURATION }} \
|
|
--no-build \
|
|
--framework ${{ env.TARGET_FRAMEWORK }} \
|
|
--filter "Category=ConnectionStability" \
|
|
--logger "console;verbosity=detailed" \
|
|
--results-directory ./TestResults
|
|
timeout-minutes: 110 # Slightly longer than expected test duration
|
|
env:
|
|
TEST_DURATION_MINUTES: ${{ env.TEST_DURATION_MINUTES }}
|
|
|
|
- name: Upload test results
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: stability-test-results
|
|
path: ./TestResults
|
|
if: always()
|
|
|
|
- name: Check test results
|
|
if: always()
|
|
run: |
|
|
if [ -f ./TestResults/*.trx ]; then
|
|
echo "Test results found"
|
|
cat ./TestResults/*.trx
|
|
else
|
|
echo "No test results found"
|
|
fi
|