diff --git a/tests/Opc.Ua.PlasticsRubber.Datasets.Tests/ProductionDatasetClientTests.cs b/tests/Opc.Ua.PlasticsRubber.Datasets.Tests/ProductionDatasetClientTests.cs index a6db23e18c..ebbbbb8d07 100644 --- a/tests/Opc.Ua.PlasticsRubber.Datasets.Tests/ProductionDatasetClientTests.cs +++ b/tests/Opc.Ua.PlasticsRubber.Datasets.Tests/ProductionDatasetClientTests.cs @@ -102,7 +102,7 @@ namespace Opc.Ua.PlasticsRubber.Datasets.Tests using var source = new MemoryStream([1]); Task upload = client.UploadAsync(Options(), source).AsTask(); await peer.CommitStarted.Task.WaitAsync(TimeSpan.FromSeconds(10)).ConfigureAwait(false); - Assert.CatchAsync(async () => await upload.ConfigureAwait(false)); + await Assert.CatchAsync(async () => await upload.ConfigureAwait(false)); Assert.That(peer.CommitCalls, Is.EqualTo(1)); } diff --git a/tests/Opc.Ua.Server.Tests/NodeManager/HistoryReadContinuationDispatchTests.cs b/tests/Opc.Ua.Server.Tests/NodeManager/HistoryReadContinuationDispatchTests.cs index a74ef75c53..766581e70b 100644 --- a/tests/Opc.Ua.Server.Tests/NodeManager/HistoryReadContinuationDispatchTests.cs +++ b/tests/Opc.Ua.Server.Tests/NodeManager/HistoryReadContinuationDispatchTests.cs @@ -154,14 +154,14 @@ namespace Opc.Ua.Server.Tests.NodeManager /// node manager restored, saved again and assigned to a result before it failed. /// [Test] - public void FaultedRequestKeepsAssignedClientSuppliedContinuationPoint() + public async Task FaultedRequestKeepsAssignedClientSuppliedContinuationPointAsync() { using var harness = new HistoryHarness(maxHistory: 10); var continued = new TrackingPoint(); harness.Points.SaveHistory(continued); harness.RestoreSaveAssignThenThrow(); - Assert.ThrowsAsync( + await Assert.ThrowsAsync( async () => await harness.ReadAsync(1, ToByteString(continued.Id)).ConfigureAwait(false)); Assert.That(continued.Disposed, Is.False); diff --git a/tests/Opc.Ua.Server.Tests/NodeManager/NodeManagerLifecycleTests.Batch.cs b/tests/Opc.Ua.Server.Tests/NodeManager/NodeManagerLifecycleTests.Batch.cs index c0b29dae7b..5c3be148f7 100644 --- a/tests/Opc.Ua.Server.Tests/NodeManager/NodeManagerLifecycleTests.Batch.cs +++ b/tests/Opc.Ua.Server.Tests/NodeManager/NodeManagerLifecycleTests.Batch.cs @@ -216,7 +216,7 @@ namespace Opc.Ua.Server.Tests.NodeManager m_server.CurrentInstance.NamespaceUris.GetIndexOrAppend(kModelNamespaceUri)); m_server.CurrentInstance.TypeTree.AddSubtype(unrelated, Ua.ObjectTypeIds.BaseObjectType); int decisions = 0; - Assert.ThrowsAsync(async () => + await Assert.ThrowsAsync(async () => await prepared.CommitAsync(_ => { decisions++; @@ -693,7 +693,7 @@ namespace Opc.Ua.Server.Tests.NodeManager CreateOptions(kSecondModelNamespaceUri, kSecondRegistrationValue), null); int decisions = 0; - Assert.ThrowsAsync(async () => + await Assert.ThrowsAsync(async () => { await prepared.CommitAsync(_ => { @@ -748,7 +748,7 @@ namespace Opc.Ua.Server.Tests.NodeManager CreateOptions(kSecondModelNamespaceUri, kSecondRegistrationValue), null); int decisions = 0; - Assert.ThrowsAsync(async () => + await Assert.ThrowsAsync(async () => { await prepared.CommitAsync(_ => { @@ -787,7 +787,7 @@ namespace Opc.Ua.Server.Tests.NodeManager CreateOptions(kSecondModelNamespaceUri, 404))) ], null); - Assert.ThrowsAsync(async () => + await Assert.ThrowsAsync(async () => { await prepared.CommitAsync(_ => throw new IOException("Confirmed decision noncommit.")); }); @@ -822,7 +822,7 @@ namespace Opc.Ua.Server.Tests.NodeManager first, CreateOptions(kModelNamespaceUri, 505)); int decisions = 0; - Assert.ThrowsAsync(async () => + await Assert.ThrowsAsync(async () => { await prepared.CommitAsync(_ => { @@ -854,7 +854,7 @@ namespace Opc.Ua.Server.Tests.NodeManager cancellation.Cancel(); int decisions = 0; - Assert.CatchAsync(async () => + await Assert.CatchAsync(async () => { await prepared.CommitAsync(_ => {