diff --git a/source/ArchitectureTests/ArchitectureTests.csproj b/source/ArchitectureTests/ArchitectureTests.csproj index 60effb5438..e9e2280f6b 100644 --- a/source/ArchitectureTests/ArchitectureTests.csproj +++ b/source/ArchitectureTests/ArchitectureTests.csproj @@ -22,7 +22,7 @@ limitations under the License. - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/ArchivedMessages.IntegrationTests/ArchivedMessages.IntegrationTests.csproj b/source/ArchivedMessages.IntegrationTests/ArchivedMessages.IntegrationTests.csproj index 04cf9caa28..54f0d6693b 100644 --- a/source/ArchivedMessages.IntegrationTests/ArchivedMessages.IntegrationTests.csproj +++ b/source/ArchivedMessages.IntegrationTests/ArchivedMessages.IntegrationTests.csproj @@ -23,8 +23,8 @@ limitations under the License. - - + + diff --git a/source/B2BApi.AppTests/B2BApi.AppTests.csproj b/source/B2BApi.AppTests/B2BApi.AppTests.csproj index c04d9466fe..e7ed16d132 100644 --- a/source/B2BApi.AppTests/B2BApi.AppTests.csproj +++ b/source/B2BApi.AppTests/B2BApi.AppTests.csproj @@ -8,6 +8,7 @@ + all @@ -15,7 +16,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/B2BApi.AppTests/DurableTask/DurableClientExtensions.cs b/source/B2BApi.AppTests/DurableTask/DurableClientExtensions.cs deleted file mode 100644 index 49727785c2..0000000000 --- a/source/B2BApi.AppTests/DurableTask/DurableClientExtensions.cs +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2020 Energinet DataHub A/S -// -// Licensed under the Apache License, Version 2.0 (the "License2"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using Energinet.DataHub.Core.TestCommon; -using Microsoft.Azure.WebJobs.Extensions.DurableTask; - -namespace Energinet.DataHub.EDI.B2BApi.AppTests.DurableTask; - -// TODO: -// We should move this class to TestCommon, maybe to a new project named DurableFunctionApp.TestCommon. -// It should recide in the namespace "DurableTask" like it does here. -public static class DurableClientExtensions -{ - /// - /// Wait for an orchestration that is either running or completed, - /// and which was started at, or later, than given . - /// - /// If more than one orchestration exists an exception is thrown. - /// - /// - /// - /// - /// Max time to wait for orchestration. If not specified it defaults to 30 seconds. - /// If started within given it returns the orchestration status; otherwise it throws an exception. - public static async Task WaitForOrchestrationStatusAsync( - this IDurableClient client, - DateTime createdTimeFrom, - string? name = null, - TimeSpan? waitTimeLimit = null) - { - var filter = new OrchestrationStatusQueryCondition() - { - CreatedTimeFrom = createdTimeFrom, - RuntimeStatus = - [ - OrchestrationRuntimeStatus.Pending, - OrchestrationRuntimeStatus.Running, - OrchestrationRuntimeStatus.Completed, - OrchestrationRuntimeStatus.Failed, - ], - }; - - IEnumerable durableOrchestrationState = []; - var isAvailable = await Awaiter.TryWaitUntilConditionAsync( - async () => - { - var queryResult = await client.ListInstancesAsync(filter, CancellationToken.None); - - if (queryResult == null) - return false; - - durableOrchestrationState = queryResult.DurableOrchestrationState - .Where(o => name == null || o.Name.Equals(name, StringComparison.OrdinalIgnoreCase)); - - return durableOrchestrationState.Any(); - }, - waitTimeLimit ?? TimeSpan.FromSeconds(60), - delay: TimeSpan.FromSeconds(5)); - - return isAvailable - ? durableOrchestrationState.Single() - : throw new Exception($"Orchestration did not start within configured wait time limit."); - } - - /// - /// Wait for orchestration instance to be completed within given . - /// - /// - /// - /// Max time to wait for completion. If not specified it defaults to 30 seconds. - /// If completed within given it returns the orchestration status including history; otherwise it throws an exception. - public static async Task WaitForInstanceCompletedAsync( - this IDurableClient client, - string instanceId, - TimeSpan? waitTimeLimit = null) - { - ArgumentException.ThrowIfNullOrWhiteSpace(instanceId); - - var isCompleted = await Awaiter.TryWaitUntilConditionAsync( - async () => - { - // Do not retrieve history here as it could be expensive - var completeOrchestrationStatus = await client.GetStatusAsync(instanceId); - - if (completeOrchestrationStatus.RuntimeStatus == OrchestrationRuntimeStatus.Failed) - throw new Exception($"Orchestration instance '{instanceId}' was status 'failed'."); - - return completeOrchestrationStatus.RuntimeStatus == OrchestrationRuntimeStatus.Completed; - }, - waitTimeLimit ?? TimeSpan.FromSeconds(30), - delay: TimeSpan.FromSeconds(5)); - - return isCompleted - ? await client.GetStatusAsync(instanceId, showHistory: true, showHistoryOutput: true) - : throw new Exception($"Orchestration instance '{instanceId}' did not complete within configured wait time limit."); - } -} diff --git a/source/B2BApi.AppTests/DurableTask/DurableTaskManager.cs b/source/B2BApi.AppTests/DurableTask/DurableTaskManager.cs deleted file mode 100644 index 775cc256fe..0000000000 --- a/source/B2BApi.AppTests/DurableTask/DurableTaskManager.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2020 Energinet DataHub A/S -// -// Licensed under the Apache License, Version 2.0 (the "License2"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using Microsoft.Azure.WebJobs.Extensions.DurableTask; -using Microsoft.Azure.WebJobs.Extensions.DurableTask.ContextImplementations; -using Microsoft.Azure.WebJobs.Extensions.DurableTask.Options; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; - -namespace Energinet.DataHub.EDI.B2BApi.AppTests.DurableTask; - -/// -/// A manager that can be used to manage orchestrations in Durable Functions, -/// typically from integration tests. -/// See https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-instance-management?tabs=csharp -/// -/// IMPORTANT: This class is purely intended to be used from tests. -/// -/// For production scenarious it is recommended to manage instances using -/// the Durable Functions orchestration client binding. -/// See https://github.com/Azure/azure-functions-durable-extension/issues/1600#issuecomment-742176091. -/// -public sealed class DurableTaskManager : IDisposable, IAsyncDisposable -{ - // TODO: - // We should move this class to TestCommon, maybe to a new project named DurableFunctionApp.TestCommon. - // It should recide in the namespace "DurableTask" like it does here. - // When it has been moved we should remove our current dependency to the NuGet package "Microsoft.Azure.WebJobs.Extensions.DurableTask". - public DurableTaskManager( - string storageProviderConnectionStringName, - string storageProviderConnectionString) - { - ArgumentException.ThrowIfNullOrWhiteSpace(storageProviderConnectionStringName); - ArgumentException.ThrowIfNullOrWhiteSpace(storageProviderConnectionString); - - ConnectionStringName = storageProviderConnectionStringName; - ConnectionString = storageProviderConnectionString; - - var services = ConfigureServices(ConnectionStringName, ConnectionString); - ServiceProvider = services.BuildServiceProvider(); - } - - /// - /// The storage provider connection string name in configuration. - /// - public string ConnectionStringName { get; } - - /// - /// The storage provider connection string. - /// This value should be configured as the value of the setting. - /// - public string ConnectionString { get; } - - private ServiceProvider ServiceProvider { get; } - - /// - /// Create a durable client that can be used to manage the Task Hub given by . - /// - public IDurableClient CreateClient(string taskHubName) - { - ArgumentException.ThrowIfNullOrWhiteSpace(taskHubName); - - var clientFactory = ServiceProvider.GetRequiredService(); - return clientFactory.CreateClient(new DurableClientOptions - { - ConnectionName = ConnectionStringName, - TaskHub = taskHubName, - }); - } - - public async ValueTask DisposeAsync() - { - await ServiceProvider.DisposeAsync(); - } - - public void Dispose() - { - ServiceProvider.Dispose(); - } - - /// - /// Ensure we register services and configuration necessary for - /// later requesting the creation of the type . - /// - private static ServiceCollection ConfigureServices(string connectionStringName, string connectionString) - { - var services = new ServiceCollection(); - - var configuration = new ConfigurationBuilder() - .AddInMemoryCollection(new Dictionary() - { - [connectionStringName] = connectionString, - }) - .Build(); - services.AddSingleton(configuration); - - services.AddDurableClientFactory(); - - return services; - } -} diff --git a/source/B2BApi.AppTests/Fixtures/B2BApiAppFixture.cs b/source/B2BApi.AppTests/Fixtures/B2BApiAppFixture.cs index 82fc488e52..af8ebda32c 100644 --- a/source/B2BApi.AppTests/Fixtures/B2BApiAppFixture.cs +++ b/source/B2BApi.AppTests/Fixtures/B2BApiAppFixture.cs @@ -16,6 +16,7 @@ using System.Diagnostics.CodeAnalysis; using Azure.Storage.Blobs; using Energinet.DataHub.Core.Databricks.SqlStatementExecution; +using Energinet.DataHub.Core.DurableFunctionApp.TestCommon.DurableTask; using Energinet.DataHub.Core.FunctionApp.TestCommon.Azurite; using Energinet.DataHub.Core.FunctionApp.TestCommon.Configuration; using Energinet.DataHub.Core.FunctionApp.TestCommon.Databricks; @@ -24,7 +25,6 @@ using Energinet.DataHub.Core.FunctionApp.TestCommon.ServiceBus.ResourceProvider; using Energinet.DataHub.Core.Messaging.Communication.Extensions.Options; using Energinet.DataHub.Core.TestCommon.Diagnostics; -using Energinet.DataHub.EDI.B2BApi.AppTests.DurableTask; using Energinet.DataHub.EDI.B2BApi.Functions; using Energinet.DataHub.EDI.BuildingBlocks.Domain.Models; using Energinet.DataHub.EDI.BuildingBlocks.Infrastructure.Configuration.Options; diff --git a/source/B2BApi.AppTests/Functions/EnqueueMessages/EnqueueMessagesOrchestrationTests.cs b/source/B2BApi.AppTests/Functions/EnqueueMessages/EnqueueMessagesOrchestrationTests.cs index 1790bba93f..9e1beb05e1 100644 --- a/source/B2BApi.AppTests/Functions/EnqueueMessages/EnqueueMessagesOrchestrationTests.cs +++ b/source/B2BApi.AppTests/Functions/EnqueueMessages/EnqueueMessagesOrchestrationTests.cs @@ -14,10 +14,10 @@ using System.Collections.Immutable; using Azure.Messaging.ServiceBus; +using Energinet.DataHub.Core.DurableFunctionApp.TestCommon.DurableTask; using Energinet.DataHub.Core.FunctionApp.TestCommon.Databricks; using Energinet.DataHub.Core.FunctionApp.TestCommon.ServiceBus.ListenerMock; using Energinet.DataHub.Core.TestCommon; -using Energinet.DataHub.EDI.B2BApi.AppTests.DurableTask; using Energinet.DataHub.EDI.B2BApi.AppTests.Fixtures; using Energinet.DataHub.EDI.BuildingBlocks.Domain.Models; using Energinet.DataHub.EDI.IntegrationTests.Behaviours.IntegrationEvents.TestData; @@ -110,10 +110,10 @@ public async Task Given_CalculationOrchestrationId_When_CalculationCompletedEven // Assert // => Verify expected behaviour by searching the orchestration history - var actualOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestrationStatusAsync(createdTimeFrom: beforeOrchestrationCreated); + var actualOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestationStartedAsync(createdTimeFrom: beforeOrchestrationCreated); // => Wait for completion - var completeOrchestrationStatus = await Fixture.DurableClient.WaitForInstanceCompletedAsync( + var completeOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestrationCompletedAsync( actualOrchestrationStatus.InstanceId, TimeSpan.FromMinutes(5)); @@ -206,10 +206,10 @@ await ClearAndAddDatabricksData( // Assert // => Verify expected behaviour by searching the orchestration history - var actualOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestrationStatusAsync(createdTimeFrom: beforeOrchestrationCreated); + var actualOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestationStartedAsync(createdTimeFrom: beforeOrchestrationCreated); // => Wait for completion - var completeOrchestrationStatus = await Fixture.DurableClient.WaitForInstanceCompletedAsync( + var completeOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestrationCompletedAsync( actualOrchestrationStatus.InstanceId, TimeSpan.FromMinutes(5)); @@ -301,7 +301,7 @@ public async Task Given_DatabricksHasNoData_When_CalculationCompletedEventIsHand // Assert // => Verify expected behaviour by searching the orchestration history - var actualOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestrationStatusAsync(createdTimeFrom: beforeOrchestrationCreated); + var actualOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestationStartedAsync(createdTimeFrom: beforeOrchestrationCreated); // => Wait for running and expected history JArray? actualHistory = null; @@ -359,7 +359,7 @@ await ClearAndAddInvalidDatabricksData( // Act var beforeOrchestrationCreated = DateTime.UtcNow; await Fixture.TopicResource.SenderClient.SendMessageAsync(wholesaleCalculationCompletedEventMessage); - var actualWholesaleOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestrationStatusAsync(createdTimeFrom: beforeOrchestrationCreated); + var actualWholesaleOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestationStartedAsync(createdTimeFrom: beforeOrchestrationCreated); // Assert using var assertionScope = new AssertionScope(); @@ -423,7 +423,7 @@ await ClearAndAddInvalidDatabricksData( // Act var beforeOrchestrationCreated = DateTime.UtcNow; await Fixture.TopicResource.SenderClient.SendMessageAsync(energyCalculationCompletedEventMessage); - var actualEnergyOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestrationStatusAsync(createdTimeFrom: beforeOrchestrationCreated); + var actualEnergyOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestationStartedAsync(createdTimeFrom: beforeOrchestrationCreated); // Assert using var assertionScope = new AssertionScope(); diff --git a/source/B2BApi.AppTests/Functions/RequestWholesaleServices/RequestWholesaleServicesOrchestrationTests.cs b/source/B2BApi.AppTests/Functions/RequestWholesaleServices/RequestWholesaleServicesOrchestrationTests.cs index 0452d5e1de..d630a1d08d 100644 --- a/source/B2BApi.AppTests/Functions/RequestWholesaleServices/RequestWholesaleServicesOrchestrationTests.cs +++ b/source/B2BApi.AppTests/Functions/RequestWholesaleServices/RequestWholesaleServicesOrchestrationTests.cs @@ -14,8 +14,8 @@ using System.Diagnostics; using System.Net; +using Energinet.DataHub.Core.DurableFunctionApp.TestCommon.DurableTask; using Energinet.DataHub.Core.FunctionApp.TestCommon.Databricks; -using Energinet.DataHub.EDI.B2BApi.AppTests.DurableTask; using Energinet.DataHub.EDI.B2BApi.AppTests.Fixtures; using Energinet.DataHub.EDI.B2BApi.AppTests.Fixtures.Extensions; using Energinet.DataHub.EDI.B2BApi.Functions.RequestWholesaleServices; @@ -88,13 +88,13 @@ public async Task Given_RequestWholesaleServices_When_RequestWholesaleServicesOr await httpResponse.EnsureSuccessStatusCodeWithLogAsync(Fixture.TestLogger); // => Wait for orchestration to start - var startedOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestrationStatusAsync( + var startedOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestationStartedAsync( createdTimeFrom: beforeOrchestrationCreated.ToDateTimeUtc(), name: nameof(RequestWholesaleServicesOrchestration)); startedOrchestrationStatus.Should().NotBeNull(); // => Wait for orchestration to complete - var completedOrchestrationStatus = await Fixture.DurableClient.WaitForInstanceCompletedAsync( + var completedOrchestrationStatus = await Fixture.DurableClient.WaitForOrchestrationCompletedAsync( startedOrchestrationStatus.InstanceId, TimeSpan.FromMinutes(5)); completedOrchestrationStatus.Should().NotBeNull(); diff --git a/source/B2CWebApi.AppTests/B2CWebApi.AppTests.csproj b/source/B2CWebApi.AppTests/B2CWebApi.AppTests.csproj index 821b2022e4..ed406b91a6 100644 --- a/source/B2CWebApi.AppTests/B2CWebApi.AppTests.csproj +++ b/source/B2CWebApi.AppTests/B2CWebApi.AppTests.csproj @@ -13,7 +13,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/BuildingBlocks.Tests/BuildingBlocks.Tests.csproj b/source/BuildingBlocks.Tests/BuildingBlocks.Tests.csproj index 57b79b921a..3cfb563ea3 100644 --- a/source/BuildingBlocks.Tests/BuildingBlocks.Tests.csproj +++ b/source/BuildingBlocks.Tests/BuildingBlocks.Tests.csproj @@ -22,10 +22,10 @@ limitations under the License. - + - + diff --git a/source/Edi.UnitTests/Edi.UnitTests.csproj b/source/Edi.UnitTests/Edi.UnitTests.csproj index 34bd5585fb..d07819179d 100644 --- a/source/Edi.UnitTests/Edi.UnitTests.csproj +++ b/source/Edi.UnitTests/Edi.UnitTests.csproj @@ -7,8 +7,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/IncomingMessages.IntegrationTests/IncomingMessages.IntegrationTests.csproj b/source/IncomingMessages.IntegrationTests/IncomingMessages.IntegrationTests.csproj index 087f686683..f46674c479 100644 --- a/source/IncomingMessages.IntegrationTests/IncomingMessages.IntegrationTests.csproj +++ b/source/IncomingMessages.IntegrationTests/IncomingMessages.IntegrationTests.csproj @@ -26,9 +26,9 @@ limitations under the License. all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + diff --git a/source/IntegrationEvents.IntegrationTests/IntegrationEvents.IntegrationTests.csproj b/source/IntegrationEvents.IntegrationTests/IntegrationEvents.IntegrationTests.csproj index 69f5372518..cd62d0293d 100644 --- a/source/IntegrationEvents.IntegrationTests/IntegrationEvents.IntegrationTests.csproj +++ b/source/IntegrationEvents.IntegrationTests/IntegrationEvents.IntegrationTests.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/source/IntegrationTests/IntegrationTests.csproj b/source/IntegrationTests/IntegrationTests.csproj index 371f8316b3..50217295a3 100644 --- a/source/IntegrationTests/IntegrationTests.csproj +++ b/source/IntegrationTests/IntegrationTests.csproj @@ -23,8 +23,8 @@ limitations under the License. - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/MasterData.IntegrationTests/MasterData.IntegrationTests.csproj b/source/MasterData.IntegrationTests/MasterData.IntegrationTests.csproj index c1bec8772a..1d22e40cc3 100644 --- a/source/MasterData.IntegrationTests/MasterData.IntegrationTests.csproj +++ b/source/MasterData.IntegrationTests/MasterData.IntegrationTests.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/source/OutgoingMessages.IntegrationTests/OutgoingMessages.IntegrationTests.csproj b/source/OutgoingMessages.IntegrationTests/OutgoingMessages.IntegrationTests.csproj index 4bdb937b86..98feb434cc 100644 --- a/source/OutgoingMessages.IntegrationTests/OutgoingMessages.IntegrationTests.csproj +++ b/source/OutgoingMessages.IntegrationTests/OutgoingMessages.IntegrationTests.csproj @@ -13,7 +13,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/source/ProcessManager.Client.Tests/ProcessManager.Client.Tests.csproj b/source/ProcessManager.Client.Tests/ProcessManager.Client.Tests.csproj index 375d408c94..e30913845e 100644 --- a/source/ProcessManager.Client.Tests/ProcessManager.Client.Tests.csproj +++ b/source/ProcessManager.Client.Tests/ProcessManager.Client.Tests.csproj @@ -25,7 +25,7 @@ - + diff --git a/source/ProcessManager.Core.Tests/ProcessManager.Core.Tests.csproj b/source/ProcessManager.Core.Tests/ProcessManager.Core.Tests.csproj index 51abf729dd..d8c15080b5 100644 --- a/source/ProcessManager.Core.Tests/ProcessManager.Core.Tests.csproj +++ b/source/ProcessManager.Core.Tests/ProcessManager.Core.Tests.csproj @@ -12,8 +12,8 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/source/ProcessManager.Orchestrations.Tests/ProcessManager.Orchestrations.Tests.csproj b/source/ProcessManager.Orchestrations.Tests/ProcessManager.Orchestrations.Tests.csproj index c007a04230..730c141e17 100644 --- a/source/ProcessManager.Orchestrations.Tests/ProcessManager.Orchestrations.Tests.csproj +++ b/source/ProcessManager.Orchestrations.Tests/ProcessManager.Orchestrations.Tests.csproj @@ -20,7 +20,7 @@ - + diff --git a/source/ProcessManager.SubsystemTests/ProcessManager.SubsystemTests.csproj b/source/ProcessManager.SubsystemTests/ProcessManager.SubsystemTests.csproj index 21e82bd7ff..5ce367e0d5 100644 --- a/source/ProcessManager.SubsystemTests/ProcessManager.SubsystemTests.csproj +++ b/source/ProcessManager.SubsystemTests/ProcessManager.SubsystemTests.csproj @@ -15,7 +15,7 @@ - + diff --git a/source/ProcessManager.Tests/ProcessManager.Tests.csproj b/source/ProcessManager.Tests/ProcessManager.Tests.csproj index 3c14a8a19b..e7cc303877 100644 --- a/source/ProcessManager.Tests/ProcessManager.Tests.csproj +++ b/source/ProcessManager.Tests/ProcessManager.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/source/SubsystemTests/Drivers/EdiDriver.cs b/source/SubsystemTests/Drivers/EdiDriver.cs index 0812dee78b..ee91d1b4ad 100644 --- a/source/SubsystemTests/Drivers/EdiDriver.cs +++ b/source/SubsystemTests/Drivers/EdiDriver.cs @@ -17,7 +17,7 @@ using System.Net.Http.Headers; using System.Text; using System.Xml; -using Energinet.DataHub.EDI.B2BApi.AppTests.DurableTask; +using Energinet.DataHub.Core.DurableFunctionApp.TestCommon.DurableTask; using Energinet.DataHub.EDI.BuildingBlocks.Domain.Models; using Energinet.DataHub.EDI.SubsystemTests.Exceptions; using Energinet.DataHub.EDI.SubsystemTests.Logging; @@ -184,14 +184,14 @@ internal async Task RequestAggregatedMeasureDataAsync(bool withSyncError, internal async Task WaitForOrchestrationStartedAsync(Instant orchestrationStartedAfter) { - var orchestration = await _durableClient.WaitForOrchestrationStatusAsync(orchestrationStartedAfter.ToDateTimeUtc()); + var orchestration = await _durableClient.WaitForOrchestationStartedAsync(orchestrationStartedAfter.ToDateTimeUtc()); return orchestration; } internal async Task WaitForOrchestrationCompletedAsync(string orchestrationInstanceId) { - await _durableClient.WaitForInstanceCompletedAsync(orchestrationInstanceId, TimeSpan.FromMinutes(30)); + await _durableClient.WaitForOrchestrationCompletedAsync(orchestrationInstanceId, TimeSpan.FromMinutes(30)); } internal async Task SendMeteredDataForMeasurementPointAsync(Guid calculationId, Instant createdAfter) diff --git a/source/SubsystemTests/LoadTest/LoadTestFixture.cs b/source/SubsystemTests/LoadTest/LoadTestFixture.cs index 7a5edf40d8..9514c0803c 100644 --- a/source/SubsystemTests/LoadTest/LoadTestFixture.cs +++ b/source/SubsystemTests/LoadTest/LoadTestFixture.cs @@ -15,8 +15,8 @@ using System.Diagnostics.CodeAnalysis; using Azure.Identity; using Azure.Messaging.ServiceBus; +using Energinet.DataHub.Core.DurableFunctionApp.TestCommon.DurableTask; using Energinet.DataHub.Core.FunctionApp.TestCommon.Configuration; -using Energinet.DataHub.EDI.B2BApi.AppTests.DurableTask; using Energinet.DataHub.EDI.SubsystemTests.Drivers; using Microsoft.ApplicationInsights; using Microsoft.ApplicationInsights.Extensibility; diff --git a/source/SubsystemTests/SubsystemTestFixture.cs b/source/SubsystemTests/SubsystemTestFixture.cs index f9df078af3..24f0bf1824 100644 --- a/source/SubsystemTests/SubsystemTestFixture.cs +++ b/source/SubsystemTests/SubsystemTestFixture.cs @@ -16,8 +16,8 @@ using System.Net.Http.Headers; using Azure.Identity; using Azure.Messaging.ServiceBus; +using Energinet.DataHub.Core.DurableFunctionApp.TestCommon.DurableTask; using Energinet.DataHub.Core.FunctionApp.TestCommon.Configuration; -using Energinet.DataHub.EDI.B2BApi.AppTests.DurableTask; using Energinet.DataHub.EDI.SubsystemTests.Drivers; using Energinet.DataHub.EDI.SubsystemTests.Drivers.B2C; using Energinet.DataHub.EDI.SubsystemTests.Drivers.Ebix; diff --git a/source/SubsystemTests/SubsystemTests.csproj b/source/SubsystemTests/SubsystemTests.csproj index 01362bf35c..b1cd2e98ae 100644 --- a/source/SubsystemTests/SubsystemTests.csproj +++ b/source/SubsystemTests/SubsystemTests.csproj @@ -74,9 +74,10 @@ - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/SystemTests/SystemTests.csproj b/source/SystemTests/SystemTests.csproj index 2b0cbba764..675c4860c6 100644 --- a/source/SystemTests/SystemTests.csproj +++ b/source/SystemTests/SystemTests.csproj @@ -10,11 +10,11 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/source/Tests/Tests.csproj b/source/Tests/Tests.csproj index 4a4861e191..8107b43919 100644 --- a/source/Tests/Tests.csproj +++ b/source/Tests/Tests.csproj @@ -22,7 +22,7 @@ limitations under the License. - + all runtime; build; native; contentfiles; analyzers; buildtransitive