Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a system test for DurableSubscriptions #2839

Open
wants to merge 10 commits into
base: develop/durable
Choose a base branch
from

Conversation

Archie-Miller
Copy link
Contributor

Uses the same parameters to validate non Durable vs Durable

Proposed changes

Implement a system unit test to test the functionality of Durable Subscriptions in the Reference Server

Tests add 14 seconds to the Opc.Ua.Client.Tests

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply. You can also fill these out after creating the PR.

  • Bugfix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • [ x ] Test enhancement (non-breaking change to increase test coverage)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected, requires version increase of Nuget packages)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • [ x ] I have read the CONTRIBUTING doc.
  • [ x ] I have signed the CLA.
  • [ x ] I ran tests locally with my changes, all passed.
  • I fixed all failing tests in the CI pipelines.
  • I fixed all introduced issues with CodeQL and LGTM.
  • [ x ] I have added tests that prove my fix is effective or that my feature works and increased code coverage.
  • I have added necessary documentation (if appropriate).
  • Any dependent changes have been merged and published in downstream modules.

Uses the same parameters to validate non Durable vs Durable
Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.01%. Comparing base (d2b4aa2) to head (e8036aa).

Additional details and impacted files
@@                 Coverage Diff                 @@
##           develop/durable    #2839      +/-   ##
===================================================
+ Coverage            55.97%   56.01%   +0.03%     
===================================================
  Files                  353      353              
  Lines                66248    66248              
  Branches             13582    13582              
===================================================
+ Hits                 37085    37111      +26     
+ Misses               25192    25164      -28     
- Partials              3971     3973       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@romanett
Copy link
Contributor

romanett commented Nov 7, 2024

Test seems to work good on my machine, however the Test fails on MacOS & Linux:

Linux:

Failed Validate Transfer [9 s]
  Error Message:
     Assert.That(arg1, Is.LessThan(arg2))
  Expected: less than 1500.0d
  But was:  1527.681d

  Stack Trace:
     at NUnit.Framework.Legacy.ClassicAssert.Less(Double arg1, Double arg2)
   at Opc.Ua.Client.Tests.DurableSubscriptionTest.TestSessionTransfer(Boolean setSubscriptionDurable) in /_/Tests/Opc.Ua.Client.Tests/DurableSubscriptionTest.cs:line 461

MacOS:

Failed Validate Transfer [66 ms]
 Error Message:
    Assert.That(anObject, Is.Not.Null)
 Expected: not null
 But was:  null

 Stack Trace:
    at NUnit.Framework.Legacy.ClassicAssert.IsNotNull(Object anObject)
  at Opc.Ua.Client.Tests.DurableSubscriptionTest.GetDesiredNodeIds(UInt32 subscriptionId) in /_/Tests/Opc.Ua.Client.Tests/DurableSubscriptionTest.cs:line 601
  at Opc.Ua.Client.Tests.DurableSubscriptionTest.TestSessionTransfer(Boolean setSubscriptionDurable) in /_/Tests/Opc.Ua.Client.Tests/DurableSubscriptionTest.cs:line 352

@romanett
Copy link
Contributor

@Archie-Miller new CI test failure:

Failed Validate Transfer [85 ms]
Error Message:
Unable to find MonitoredItemCount
Assert.That(anObject, Is.Not.Null)
Expected: not null
But was: null

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