Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using System.Collections.Concurrent;
using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -22,7 +23,7 @@ namespace Dapr.IntegrationTest.Workflow;

public sealed class ActivityCompletionAcknowledgementTests
{
[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ActivityCompletion_ShouldNotBeRetried_WhenAcknowledged()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using System.Collections.Concurrent;
using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -23,7 +24,7 @@ namespace Dapr.IntegrationTest.Workflow;

public sealed class ActivityCompletionLoadTests
{
[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ActivityCompletions_ShouldBeAcknowledged_UnderLoad()
{
const int activityCount = 50;
Expand Down
3 changes: 2 additions & 1 deletion test/Dapr.IntegrationTest.Workflow/ActivitySleepTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using System.Diagnostics;
using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -22,7 +23,7 @@ namespace Dapr.IntegrationTest.Workflow;

public sealed class ActivitySleepTests
{
[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldHandleActivitySleep()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using System.Collections.Concurrent;
using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -27,7 +28,7 @@ public sealed class ChildWorkflowRetryPolicyBackoffTests
private static readonly TimeSpan FirstRetryInterval = TimeSpan.FromSeconds(5);
private static readonly TimeSpan AllowedSkew = TimeSpan.FromSeconds(1);

[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldRetryChildWorkflowWithBackoff()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -35,7 +36,7 @@ public sealed class ContinueAsNewCarryoverEventsTests
/// After the fix the full buffer is captured once all events are processed, so every
/// signal survives as a carryover event and the workflow counts down to zero.
/// </summary>
[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ContinueAsNew_ShouldCarryOverEvents_WhenMultipleSignalsArriveTogether()
{
const int signalCount = 250;
Expand Down
3 changes: 2 additions & 1 deletion test/Dapr.IntegrationTest.Workflow/ContinueAsNewTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -21,7 +22,7 @@ namespace Dapr.IntegrationTest.Workflow;

public sealed class ContinueAsNewTests
{
[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldContinueAsNewUntilComplete()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand Down Expand Up @@ -53,7 +54,7 @@ public sealed class CurrentUtcDateTimeConsistencyTests
/// while checkpoint (2) returns the <em>second</em> turn's timestamp, so the
/// sequence is not monotonically non-decreasing and the assertion fails.
/// </summary>
[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task CurrentUtcDateTime_IsMonotonicallyNonDecreasing_AcrossReplays()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Common.Options;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -24,7 +25,7 @@ public sealed class DaprApiTokenWorkflowTests
{
private const string DaprApiTokenEnvVarName = "DAPR_API_TOKEN";

[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldRunWorkflowWithDaprApiTokenFromEnvVar()
{
const string daprApiToken = "workflow-env-token";
Expand Down
5 changes: 3 additions & 2 deletions test/Dapr.IntegrationTest.Workflow/ErrorHandlingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -21,7 +22,7 @@ namespace Dapr.IntegrationTest.Workflow;

public sealed class ErrorHandlingTests
{
[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldRetryFailedActivityAndSucceed()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down Expand Up @@ -63,7 +64,7 @@ public async Task ShouldRetryFailedActivityAndSucceed()
Assert.Equal("Success after retries", output);
}

[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldCancelTimerOnExternalEvent()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -34,7 +35,7 @@ public sealed class ExternalEventDoesNotBlockConcurrencySlotTests
/// 3 workflows that each wait on an external event, then schedule a 4th workflow and
/// confirm it completes before releasing the waiting ones.
/// </summary>
[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task FourthWorkflow_ShouldComplete_WhileFirstThreeAreWaitingOnExternalEvent()
{
const int concurrencyLimit = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

using Dapr.Client;
using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -30,7 +31,7 @@ public sealed partial class ExternalInputWorkflowTests
new("Computers", 500, 100)
];

[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldHandleMultipleExternalEvents_Simple()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down Expand Up @@ -77,7 +78,7 @@ public async Task ShouldHandleMultipleExternalEvents_Simple()
Assert.Equal("FirstData-42-True", output);
}

[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldHandleStandardWorkflowsWithDependencyInjection()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down Expand Up @@ -173,7 +174,7 @@ await daprWorkflowClient.ScheduleNewWorkflowAsync(nameof(OrderProcessingWorkflow
Assert.True(resultValue.Processed);
}

[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldHandleExternalEventTimeout()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down Expand Up @@ -216,7 +217,7 @@ public async Task ShouldHandleExternalEventTimeout()
Assert.Equal("Timeout", output);
}

[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldHandleExternalEventWithDefaultValue()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down Expand Up @@ -317,7 +318,7 @@ public enum ApprovalResult
Rejected = 2
}

[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldHandleMultipleExternalEvents()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down
3 changes: 2 additions & 1 deletion test/Dapr.IntegrationTest.Workflow/FanOutFanInTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -23,7 +24,7 @@ public sealed class FanOutFanInTests
{
private const string CompletedMessage = "Workflow completed!";

[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldFanOutAndFanIn()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -25,7 +26,7 @@ public sealed class MaxConcurrentActivitiesTests
/// Verifies that <see cref="WorkflowRuntimeOptions.MaxConcurrentActivities"/> = 1 limits
/// activity execution to a single concurrent activity even when the workflow fans out more.
/// </summary>
[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldRespectMaxConcurrentActivitiesLimitOfOne()
{
const int limit = 1;
Expand Down Expand Up @@ -82,7 +83,7 @@ public async Task ShouldRespectMaxConcurrentActivitiesLimitOfOne()
/// Verifies that <see cref="WorkflowRuntimeOptions.MaxConcurrentActivities"/> = 3 allows up to
/// 3 concurrent activities and that all activities complete successfully.
/// </summary>
[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldRespectMaxConcurrentActivitiesLimitOfThree()
{
const int limit = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -25,7 +26,7 @@ public sealed class MaxConcurrentWorkflowsTests
/// Verifies that setting <see cref="WorkflowRuntimeOptions.MaxConcurrentWorkflows"/> to 1
/// does not deadlock the runtime and that all scheduled workflows eventually complete.
/// </summary>
[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldCompleteAllWorkflowsWhenLimitIsOne()
{
const int workflowCount = 3;
Expand Down Expand Up @@ -86,7 +87,7 @@ await Task.WhenAll(workflowInstanceIds.Select(id =>
/// Verifies that a custom <see cref="WorkflowRuntimeOptions.MaxConcurrentWorkflows"/> value
/// greater than 1 does not deadlock the runtime and that all scheduled workflows complete.
/// </summary>
[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldCompleteAllWorkflowsWithCustomConcurrencyLimit()
{
const int limit = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Common.Options;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -22,7 +23,7 @@ namespace Dapr.IntegrationTest.Workflow;

public sealed class MultiAppActivityTests
{
[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldScheduleActivityOnRemoteAppUsingAppId()
{
var guid = Guid.NewGuid().ToString("N");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Common.Options;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -27,7 +28,7 @@ public sealed class MultiAppChildWorkflowAndActivityTests
private static readonly string App2Id = $"workflow-app-2-{UniqueId}";
private static readonly string App3Id = $"workflow-app-3-{UniqueId}";

[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldScheduleChildWorkflowOnRemoteApp_ThatCallsActivityOnAnotherRemoteApp_UsingAppIds()
{
var options1 = new DaprRuntimeOptions().WithAppId(App1Id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Common.Options;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -22,7 +23,7 @@ namespace Dapr.IntegrationTest.Workflow;

public sealed class MultiAppChildWorkflowTests
{
[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldScheduleChildWorkflowOnRemoteAppUsingAppId()
{
var guid = Guid.NewGuid().ToString("N");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

using Dapr.Testcontainers.Common;
using Dapr.Testcontainers.Harnesses;
using Dapr.Testcontainers.Xunit.Attributes;
using Dapr.Workflow;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -21,7 +22,7 @@ namespace Dapr.IntegrationTest.Workflow;

public sealed class ParallelExecutionTests
{
[Fact]
[MinimumDaprRuntimeFact("1.17.0")]
public async Task ShouldExecuteActivitiesInParallel()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down Expand Up @@ -70,7 +71,7 @@ public async Task ShouldExecuteActivitiesInParallel()
Assert.True(duration.TotalSeconds < 5, $"Expected parallel execution to complete in < 5 seconds, took {duration.TotalSeconds}");
}

[Fact]
[MinimumDaprRuntimeFact("1.17")]
public async Task ShouldFanOutFanInWithActivities()
{
var componentsDir = TestDirectoryManager.CreateTestDirectory("workflow-components");
Expand Down
Loading
Loading