using Opc.Ua.Server; using Shouldly; using Xunit; namespace ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests; /// /// Gitea #870: the running server's monitored-item queue factory is (every event /// item's queue is a ; the SDK's always asks /// the server's factory), and data-change queues are still the SDK's own. /// // Shares a collection with the other user of OtOpcUaSdkServer.RingEventQueues (a process-wide switch the perf // harness flips), so the wiring assertion never observes it switched off (#870 review). [Collection(RingEventQueueSwitchCollection.Name)] public sealed class RingEventQueueWiringTests { [Fact] public async Task The_server_creates_ring_event_queues_and_sdk_data_change_queues() { var ct = TestContext.Current.CancellationToken; await using var rig = await ServerEventRig.StartAsync("RingQueue870", encrypted: false, ct); var factory = rig.Server.CurrentInstance.MonitoredItemQueueFactory.ShouldBeOfType(); factory.SupportsDurableQueues.ShouldBeFalse(); factory.CreateEventQueue(false, 1).ShouldBeOfType(); factory.CreateDataChangeQueue(false, 2).ShouldBeOfType(); } } /// Serialises the tests that read or flip OtOpcUaSdkServer.RingEventQueues. [CollectionDefinition(Name)] public sealed class RingEventQueueSwitchCollection { /// The collection name. public const string Name = "RingEventQueueSwitch"; }