Skip to content

Commit

Permalink
Remove DUrableTaskManager from fixture - it's not used
Browse files Browse the repository at this point in the history
  • Loading branch information
dstenroejl committed Dec 18, 2024
1 parent b49c1e7 commit 36e9a41
Showing 1 changed file with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System.Diagnostics.CodeAnalysis;
using Energinet.DataHub.Core.DurableFunctionApp.TestCommon.DurableTask;
using Energinet.DataHub.Core.FunctionApp.TestCommon.Azurite;
using Energinet.DataHub.Core.FunctionApp.TestCommon.Configuration;
using Energinet.DataHub.Example.Orchestrations.Tests.Fixtures;
using Energinet.DataHub.ProcessManager.Core.Tests.Fixtures;
using Energinet.DataHub.ProcessManager.Tests.Fixtures;
using Microsoft.Azure.WebJobs.Extensions.DurableTask;
using Xunit.Abstractions;

namespace Energinet.DataHub.ProcessManager.Client.Tests.Fixtures;

/// <summary>
/// Support testing the Process Manager Clients by coordinating the startup
/// of the dependent applications Example.Orchestrations and ProcessManager (Api).
/// </summary>
public class ProcessManagerClientFixture : IAsyncLifetime
{
private const string TaskHubName = "ClientTest01";
Expand All @@ -32,9 +33,6 @@ public ProcessManagerClientFixture()
{
DatabaseManager = new ProcessManagerDatabaseManager("ProcessManagerClientTests");
AzuriteManager = new AzuriteManager(useOAuth: true);
DurableTaskManager = new DurableTaskManager(
"AzuriteConnectionString",
AzuriteManager.FullConnectionString);

IntegrationTestConfiguration = new IntegrationTestConfiguration();

Expand Down Expand Up @@ -63,24 +61,17 @@ public ProcessManagerClientFixture()

public ProcessManagerAppManager ProcessManagerAppManager { get; }

[NotNull]
public IDurableClient? DurableClient { get; private set; }

private ProcessManagerDatabaseManager DatabaseManager { get; }

private AzuriteManager AzuriteManager { get; }

private DurableTaskManager DurableTaskManager { get; }

public async Task InitializeAsync()
{
AzuriteManager.CleanupAzuriteStorage();
AzuriteManager.StartAzurite();

await DatabaseManager.CreateDatabaseAsync();

DurableClient = DurableTaskManager.CreateClient(TaskHubName);

await ExampleOrchestrationsAppManager.StartAsync();
await ProcessManagerAppManager.StartAsync();
}
Expand All @@ -89,7 +80,6 @@ public async Task DisposeAsync()
{
await ExampleOrchestrationsAppManager.DisposeAsync();
await ProcessManagerAppManager.DisposeAsync();
await DurableTaskManager.DisposeAsync();
await DatabaseManager.DeleteDatabaseAsync();
AzuriteManager.Dispose();
}
Expand Down

0 comments on commit 36e9a41

Please sign in to comment.