diff --git a/Directory.Packages.props b/Directory.Packages.props
index 2bdd483f9..7041494bd 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -9,114 +9,108 @@
-
+
-
-
+
+
-
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
\ No newline at end of file
diff --git a/Test/DurableTask.AzureStorage.Tests/Storage/DurableTaskStorageExceptionTests.cs b/Test/DurableTask.AzureStorage.Tests/Storage/DurableTaskStorageExceptionTests.cs
index f57918638..399ccd2d8 100644
--- a/Test/DurableTask.AzureStorage.Tests/Storage/DurableTaskStorageExceptionTests.cs
+++ b/Test/DurableTask.AzureStorage.Tests/Storage/DurableTaskStorageExceptionTests.cs
@@ -30,7 +30,7 @@ public void MissingRequestFailedException()
Assert.IsFalse(exception.LeaseLost);
}
- [DataTestMethod]
+ [TestMethod]
[DataRow(true, HttpStatusCode.Conflict, nameof(BlobErrorCode.LeaseLost))]
[DataRow(false, HttpStatusCode.Conflict, nameof(BlobErrorCode.LeaseNotPresentWithBlobOperation))]
[DataRow(false, HttpStatusCode.NotFound, nameof(BlobErrorCode.BlobNotFound))]
diff --git a/samples/DistributedTraceSample/ApplicationInsights/ApplicationInsightsSample.csproj b/samples/DistributedTraceSample/ApplicationInsights/ApplicationInsightsSample.csproj
index efbc910c6..19b2a63e8 100644
--- a/samples/DistributedTraceSample/ApplicationInsights/ApplicationInsightsSample.csproj
+++ b/samples/DistributedTraceSample/ApplicationInsights/ApplicationInsightsSample.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/src/DurableTask.AzureStorage/OrchestrationSessionManager.cs b/src/DurableTask.AzureStorage/OrchestrationSessionManager.cs
index abf7a58b2..c64cad0e6 100644
--- a/src/DurableTask.AzureStorage/OrchestrationSessionManager.cs
+++ b/src/DurableTask.AzureStorage/OrchestrationSessionManager.cs
@@ -277,7 +277,7 @@ async Task> DedupeExecutionStartedMessagesAsync(
// "Remote" -> the instance ID info comes from the Instances table that we're querying
IAsyncEnumerable instances = this.trackingStore.FetchInstanceStatusAsync(instanceIds, cancellationToken);
IDictionary remoteOrchestrationsById =
- await instances.ToDictionaryAsync(o => o.State.OrchestrationInstance.InstanceId, cancellationToken);
+ await instances.ToDictionaryAsync(o => o.State.OrchestrationInstance.InstanceId, comparer: StringComparer.OrdinalIgnoreCase, cancellationToken);
foreach (MessageData message in executionStartedMessages)
{
diff --git a/test/DurableTask.AzureServiceFabric.Integration.Tests/DeploymentUtil/DeploymentHelper.cs b/test/DurableTask.AzureServiceFabric.Integration.Tests/DeploymentUtil/DeploymentHelper.cs
index 20cb25ef8..e2921fa10 100644
--- a/test/DurableTask.AzureServiceFabric.Integration.Tests/DeploymentUtil/DeploymentHelper.cs
+++ b/test/DurableTask.AzureServiceFabric.Integration.Tests/DeploymentUtil/DeploymentHelper.cs
@@ -54,7 +54,9 @@ public static async Task CleanAsync()
var replicas = (await client.QueryManager.GetDeployedReplicaListAsync(node.NodeName, application.ApplicationName)).OfType();
foreach (var replica in replicas)
{
+ #pragma warning disable CS0618 // RemoveReplicaAsync overload is deprecated
await client.ServiceManager.RemoveReplicaAsync(node.NodeName, replica.Partitionid, replica.ReplicaId);
+ #pragma warning restore CS0618
}
}
}
diff --git a/test/DurableTask.AzureServiceFabric.Integration.Tests/DurableTask.AzureServiceFabric.Integration.Tests.csproj b/test/DurableTask.AzureServiceFabric.Integration.Tests/DurableTask.AzureServiceFabric.Integration.Tests.csproj
index 09d30327f..3864bd43e 100644
--- a/test/DurableTask.AzureServiceFabric.Integration.Tests/DurableTask.AzureServiceFabric.Integration.Tests.csproj
+++ b/test/DurableTask.AzureServiceFabric.Integration.Tests/DurableTask.AzureServiceFabric.Integration.Tests.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/test/DurableTask.AzureStorage.Tests/AsyncAutoResetEventTests.cs b/test/DurableTask.AzureStorage.Tests/AsyncAutoResetEventTests.cs
index 29d0b0ef9..7b5cb1918 100644
--- a/test/DurableTask.AzureStorage.Tests/AsyncAutoResetEventTests.cs
+++ b/test/DurableTask.AzureStorage.Tests/AsyncAutoResetEventTests.cs
@@ -21,7 +21,7 @@ namespace DurableTask.AzureStorage.Tests
[TestClass]
public class AsyncAutoResetEventTests
{
- [DataTestMethod]
+ [TestMethod]
[DataRow(false, false)]
[DataRow(true, true)]
public async Task InitialState(bool initiallySignaled, bool expectedResult)
diff --git a/test/DurableTask.AzureStorage.Tests/AzureStorageScaleTests.cs b/test/DurableTask.AzureStorage.Tests/AzureStorageScaleTests.cs
index 854aa3007..cc6f338bb 100644
--- a/test/DurableTask.AzureStorage.Tests/AzureStorageScaleTests.cs
+++ b/test/DurableTask.AzureStorage.Tests/AzureStorageScaleTests.cs
@@ -195,7 +195,7 @@ async Task EnsureTaskHubAsync(
private async Task EnsureLeasesMatchControlQueue(string directoryReference, BlobContainerClient taskHubContainer, ControlQueue[] controlQueues)
{
- BlobItem[] leaseBlobs = await taskHubContainer.GetBlobsAsync(prefix: directoryReference).ToArrayAsync();
+ BlobItem[] leaseBlobs = await taskHubContainer.GetBlobsAsync(BlobTraits.None, BlobStates.None, directoryReference, default).ToArrayAsync();
Assert.AreEqual(controlQueues.Length, leaseBlobs.Length, "Expected to see the same number of control queues and lease blobs.");
foreach (BlobItem blobItem in leaseBlobs)
{
@@ -586,7 +586,7 @@ await TestHelpers.WaitFor(
await service2.CompleteTaskOrchestrationWorkItemAsync(workItem2, runtimeState, new List(), new List(), new List(), null, null);
// Now worker 1 will attempt to complete the same work item. Since this is the first attempt to complete a work item and add a history for the orchestration (by worker 1),
// there is no etag stored for the OrchestrationSession, and so the a "conflict" exception will be thrown as worker 2 already created a history for the orchestration.
- SessionAbortedException exception = await Assert.ThrowsExceptionAsync(async () =>
+ SessionAbortedException exception = await Assert.ThrowsExactlyAsync(async () =>
await service1.CompleteTaskOrchestrationWorkItemAsync(workItem1, runtimeState, new List(), new List(), new List(), null, null)
);
Assert.IsInstanceOfType(exception.InnerException, typeof(DurableTaskStorageException));
@@ -629,7 +629,7 @@ await TestHelpers.WaitFor(
await service1.CompleteTaskOrchestrationWorkItemAsync(workItem1, runtimeState, new List(), new List(), new List(), null, null);
// Now worker 2 attempts to complete the same work item. Since this is not the first work item for the orchestration, now an etag exists for the OrchestrationSession, and the exception
// that is thrown will be "precondition failed" as the Etag is stale after worker 1 completed the work item.
- exception = await Assert.ThrowsExceptionAsync(async () =>
+ exception = await Assert.ThrowsExactlyAsync(async () =>
await service2.CompleteTaskOrchestrationWorkItemAsync(workItem2, runtimeState, new List(), new List(), new List(), null, null)
);
Assert.IsInstanceOfType(exception.InnerException, typeof(DurableTaskStorageException));
diff --git a/test/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.cs b/test/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.cs
index 3a48ee5ff..93d0ffca2 100644
--- a/test/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.cs
+++ b/test/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.cs
@@ -557,7 +557,7 @@ private async Task GetBlobCount(string containerName, string directoryName)
var containerClient = client.GetBlobContainerClient(containerName);
await containerClient.CreateIfNotExistsAsync();
- return await containerClient.GetBlobsAsync(traits: BlobTraits.Metadata, prefix: directoryName).CountAsync();
+ return await containerClient.GetBlobsAsync(BlobTraits.Metadata, BlobStates.None, directoryName, default).CountAsync();
}
@@ -2236,7 +2236,7 @@ private static async Task ValidateLargeMessageBlobUrlAsync(string taskHubName, s
BlobContainerClient container = serviceClient.GetBlobContainerClient(containerName);
Assert.IsTrue(await container.ExistsAsync(), $"Blob container {containerName} is expected to exist.");
BlobItem blob = await container
- .GetBlobsByHierarchyAsync(BlobTraits.Metadata, prefix: sanitizedInstanceId)
+ .GetBlobsByHierarchyAsync(BlobTraits.Metadata, BlobStates.None, delimiter: "/", sanitizedInstanceId, default)
.Where(x => x.IsBlob && x.Blob.Name == sanitizedInstanceId + "/" + blobName)
.Select(x => x.Blob)
.SingleOrDefaultAsync();
@@ -3060,7 +3060,7 @@ public async Task TestWorkerFailingDuringCompleteWorkItemCallLargeFailureReason(
}
}
- [TestMethod]
+ [DataTestMethod]
[DataRow(VersioningSettings.VersionMatchStrategy.Strict)]
[DataRow(VersioningSettings.VersionMatchStrategy.CurrentOrOlder)]
[DataRow(VersioningSettings.VersionMatchStrategy.None)]
@@ -3091,7 +3091,7 @@ public async Task OrchestrationFailsWithVersionMismatch(VersioningSettings.Versi
}
}
- [TestMethod]
+ [DataTestMethod]
[DataRow(VersioningSettings.VersionMatchStrategy.Strict, "1.0.0")]
[DataRow(VersioningSettings.VersionMatchStrategy.CurrentOrOlder, "1.0.0")]
[DataRow(VersioningSettings.VersionMatchStrategy.CurrentOrOlder, "0.9.0")]
@@ -3225,7 +3225,7 @@ await service.CreateTaskOrchestrationAsync(
if (useInstanceEtag)
{
// Confirm an exception is thrown due to the etag mismatch for the instance table when the worker attempts to complete the work item
- SessionAbortedException exception = await Assert.ThrowsExceptionAsync(async () =>
+ SessionAbortedException exception = await Assert.ThrowsExactlyAsync(async () =>
await service.CompleteTaskOrchestrationWorkItemAsync(workItem, runtimeState, new List(), new List(), new List(), null, null)
);
Assert.IsInstanceOfType(exception.InnerException, typeof(DurableTaskStorageException));
@@ -3383,7 +3383,7 @@ await service.CreateTaskOrchestrationAsync(
{
// Confirm an exception is thrown because the worker attempts to insert a new entity for the suborchestration into the instance table
// when one already exists
- SessionAbortedException exception = await Assert.ThrowsExceptionAsync(async () =>
+ SessionAbortedException exception = await Assert.ThrowsExactlyAsync(async () =>
await service.CompleteTaskOrchestrationWorkItemAsync(workItem, runtimeState, new List(), new List(), new List(), null, null)
);
Assert.IsInstanceOfType(exception.InnerException, typeof(DurableTaskStorageException));
@@ -3749,7 +3749,9 @@ public async Task OpenTelemetry_SayHelloWithActivity(bool enableExtendedSessions
Assert.AreEqual(activity9.SpanId, activity8.ParentSpanId);
// Checking trace ID values
- Assert.AreEqual(activity2.TraceId.ToString(), activity5.TraceId.ToString(), activity8.TraceId.ToString(), activity9.TraceId.ToString());
+ Assert.AreEqual(activity2.TraceId.ToString(), activity5.TraceId.ToString());
+ Assert.AreEqual(activity2.TraceId.ToString(), activity8.TraceId.ToString());
+ Assert.AreEqual(activity2.TraceId.ToString(), activity9.TraceId.ToString());
}
///
diff --git a/test/DurableTask.AzureStorage.Tests/Correlation/CorrelationScenarioTest.cs b/test/DurableTask.AzureStorage.Tests/Correlation/CorrelationScenarioTest.cs
index 91643511d..758c76745 100644
--- a/test/DurableTask.AzureStorage.Tests/Correlation/CorrelationScenarioTest.cs
+++ b/test/DurableTask.AzureStorage.Tests/Correlation/CorrelationScenarioTest.cs
@@ -31,7 +31,7 @@ namespace DurableTask.AzureStorage.Tests.Correlation
[TestClass]
public class CorrelationScenarioTest
{
- [DataTestMethod]
+ [TestMethod]
[DataRow(Protocol.W3CTraceContext, false)]
[DataRow(Protocol.HttpCorrelationProtocol, false)]
[DataRow(Protocol.W3CTraceContext, true)]
@@ -78,7 +78,7 @@ protected override string Execute(TaskContext context, string input)
}
}
- [DataTestMethod]
+ [TestMethod]
[DataRow(Protocol.W3CTraceContext, false)]
[DataRow(Protocol.HttpCorrelationProtocol, false)]
[DataRow(Protocol.W3CTraceContext, true)]
@@ -113,7 +113,7 @@ public async Task SingleOrchestrationWithThrowingExceptionAsync(Protocol protoco
);
}
- [DataTestMethod]
+ [TestMethod]
[DataRow(Protocol.W3CTraceContext, false)]
[DataRow(Protocol.HttpCorrelationProtocol, false)]
[DataRow(Protocol.W3CTraceContext, true)]
@@ -173,7 +173,7 @@ protected override async Task ExecuteAsync(TaskContext context, string i
}
}
- [DataTestMethod]
+ [TestMethod]
[DataRow(Protocol.W3CTraceContext, false)]
[DataRow(Protocol.HttpCorrelationProtocol, false)]
[DataRow(Protocol.W3CTraceContext, true)]
@@ -217,7 +217,7 @@ public override Task RunTask(OrchestrationContext context, string input)
}
}
- [DataTestMethod]
+ [TestMethod]
[DataRow(Protocol.W3CTraceContext, false)]
[DataRow(Protocol.HttpCorrelationProtocol, false)]
[DataRow(Protocol.W3CTraceContext, true)]
@@ -274,7 +274,7 @@ public override async Task RunTask(OrchestrationContext context, string
}
}
- [DataTestMethod]
+ [TestMethod]
[DataRow(Protocol.W3CTraceContext, false)]
[DataRow(Protocol.HttpCorrelationProtocol, false)]
[DataRow(Protocol.W3CTraceContext, true)]
@@ -338,7 +338,7 @@ protected override string Execute(TaskContext context, string input)
}
}
- [DataTestMethod]
+ [TestMethod]
[DataRow(Protocol.W3CTraceContext, false)]
[DataRow(Protocol.HttpCorrelationProtocol, false)]
[DataRow(Protocol.W3CTraceContext, true)]
@@ -447,7 +447,7 @@ protected override string Execute(TaskContext context, string input)
//[TestMethod] ContinueAsNew
- [DataTestMethod]
+ [TestMethod]
[DataRow(Protocol.W3CTraceContext, false)]
[DataRow(Protocol.HttpCorrelationProtocol, false)]
[DataRow(Protocol.W3CTraceContext, true)]
@@ -502,7 +502,7 @@ internal static void Reset()
}
}
- [DataTestMethod]
+ [TestMethod]
[DataRow(Protocol.W3CTraceContext, false)]
[DataRow(Protocol.HttpCorrelationProtocol, false)]
[DataRow(Protocol.W3CTraceContext, true)]
@@ -576,7 +576,7 @@ internal static void Reset()
}
}
- [DataTestMethod]
+ [TestMethod]
[DataRow(Protocol.W3CTraceContext, false)]
[DataRow(Protocol.HttpCorrelationProtocol, false)]
[DataRow(Protocol.W3CTraceContext, true)]
@@ -718,7 +718,7 @@ internal static void Reset()
}
}
- [DataTestMethod]
+ [TestMethod]
[DataRow(Protocol.W3CTraceContext, false)]
[DataRow(Protocol.HttpCorrelationProtocol, false)]
[DataRow(Protocol.W3CTraceContext, true)]
diff --git a/test/DurableTask.AzureStorage.Tests/Correlation/StringExtensionsTest.cs b/test/DurableTask.AzureStorage.Tests/Correlation/StringExtensionsTest.cs
index 164e7ebc0..2ba468c19 100644
--- a/test/DurableTask.AzureStorage.Tests/Correlation/StringExtensionsTest.cs
+++ b/test/DurableTask.AzureStorage.Tests/Correlation/StringExtensionsTest.cs
@@ -35,7 +35,7 @@ public void TestParseTraceParent()
public void TestParseTraceParentThrowsException()
{
string wrongTraceparentString = "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7";
- Assert.ThrowsException(
+ Assert.ThrowsExactly(
() => { wrongTraceparentString.ToTraceParent(); });
}
diff --git a/test/DurableTask.AzureStorage.Tests/KeySanitationTests.cs b/test/DurableTask.AzureStorage.Tests/KeySanitationTests.cs
index 326ffc1e3..d631241ac 100644
--- a/test/DurableTask.AzureStorage.Tests/KeySanitationTests.cs
+++ b/test/DurableTask.AzureStorage.Tests/KeySanitationTests.cs
@@ -24,7 +24,7 @@ namespace DurableTask.AzureStorage.Tests
[TestClass]
public class KeySanitationTests
{
- [DataTestMethod]
+ [TestMethod]
[DataRow("\r")]
[DataRow("")]
[DataRow("hello")]
diff --git a/test/DurableTask.AzureStorage.Tests/MessageManagerTests.cs b/test/DurableTask.AzureStorage.Tests/MessageManagerTests.cs
index 008a9eac7..e16d13526 100644
--- a/test/DurableTask.AzureStorage.Tests/MessageManagerTests.cs
+++ b/test/DurableTask.AzureStorage.Tests/MessageManagerTests.cs
@@ -23,7 +23,7 @@ namespace DurableTask.AzureStorage.Tests
[TestClass]
public class MessageManagerTests
{
- [DataTestMethod]
+ [TestMethod]
[DataRow("System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib],[System.String, System.Private.CoreLib]]")]
[DataRow("System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.String, mscorlib]]")]
public void DeserializesStandardTypes(string dictionaryType)
@@ -49,7 +49,7 @@ public void FailsDeserializingUnknownTypes()
var messageManager = SetupMessageManager(new KnownTypeBinder());
// When/Then
- Assert.ThrowsException(() => messageManager.DeserializeMessageData(message));
+ Assert.ThrowsExactly(() => messageManager.DeserializeMessageData(message));
}
@@ -69,7 +69,7 @@ public void DeserializesCustomTypes()
Assert.AreEqual("tagValue", startedEvent.Tags["tag1"]);
}
- [DataTestMethod]
+ [TestMethod]
[DataRow("blob.bin", "blob.bin")]
[DataRow("@#$%!", "%40%23%24%25%21")]
[DataRow("foo/bar/b@z.tar.gz", "foo/bar/b%40z.tar.gz")]
diff --git a/test/DurableTask.AzureStorage.Tests/Net/UriPathTests.cs b/test/DurableTask.AzureStorage.Tests/Net/UriPathTests.cs
index 78703d5fd..4f528070a 100644
--- a/test/DurableTask.AzureStorage.Tests/Net/UriPathTests.cs
+++ b/test/DurableTask.AzureStorage.Tests/Net/UriPathTests.cs
@@ -18,7 +18,7 @@ namespace DurableTask.AzureStorage.Net
[TestClass]
public class UriPathTests
{
- [DataTestMethod]
+ [TestMethod]
[DataRow("", "", "")]
[DataRow("", "bar/baz", "bar/baz")]
[DataRow("foo", "", "foo")]
diff --git a/test/DurableTask.AzureStorage.Tests/StressTests.cs b/test/DurableTask.AzureStorage.Tests/StressTests.cs
index 101dc6b51..9bdbf5542 100644
--- a/test/DurableTask.AzureStorage.Tests/StressTests.cs
+++ b/test/DurableTask.AzureStorage.Tests/StressTests.cs
@@ -49,7 +49,7 @@ public void Cleanup()
/// both in the case where they all share the same instance ID and when they have unique
/// instance IDs.
///
- [DataTestMethod]
+ [TestMethod]
[DataRow(true)]
[DataRow(false)]
public async Task ConcurrentOrchestrationStarts(bool useSameInstanceId)
diff --git a/test/DurableTask.Core.Tests/DispatcherMiddlewareTests.cs b/test/DurableTask.Core.Tests/DispatcherMiddlewareTests.cs
index e91b7ef84..b1ff65076 100644
--- a/test/DurableTask.Core.Tests/DispatcherMiddlewareTests.cs
+++ b/test/DurableTask.Core.Tests/DispatcherMiddlewareTests.cs
@@ -339,7 +339,7 @@ public async Task EnsureActivityDispatcherMiddlewareHasAccessToRuntimeState()
Assert.AreEqual("Value", executionContext?.OrchestrationTags?["Test"]);
}
- [DataTestMethod]
+ [TestMethod]
[DataRow(OrchestrationStatus.Completed)]
[DataRow(OrchestrationStatus.Failed)]
[DataRow(OrchestrationStatus.Terminated)]
diff --git a/test/DurableTask.Core.Tests/ExceptionHandlingIntegrationTests.cs b/test/DurableTask.Core.Tests/ExceptionHandlingIntegrationTests.cs
index a82897ca1..04745390d 100644
--- a/test/DurableTask.Core.Tests/ExceptionHandlingIntegrationTests.cs
+++ b/test/DurableTask.Core.Tests/ExceptionHandlingIntegrationTests.cs
@@ -49,7 +49,7 @@ public ExceptionHandlingIntegrationTests()
this.client = new TaskHubClient(service, loggerFactory: loggerFactory);
}
- [DataTestMethod]
+ [TestMethod]
[DataRow(ErrorPropagationMode.SerializeExceptions)]
[DataRow(ErrorPropagationMode.UseFailureDetails)]
public async Task CatchInvalidOperationException(ErrorPropagationMode mode)
@@ -123,7 +123,7 @@ await this.worker
Assert.AreEqual(1, retryPolicyInvokedCount);
}
- [DataTestMethod]
+ [TestMethod]
[DataRow(ErrorPropagationMode.SerializeExceptions)]
[DataRow(ErrorPropagationMode.UseFailureDetails)]
public async Task FailureDetailsOnUnhandled(ErrorPropagationMode mode)
diff --git a/test/DurableTask.Core.Tests/RetryInterceptorTests.cs b/test/DurableTask.Core.Tests/RetryInterceptorTests.cs
index eddd9b12c..d82ad53cc 100644
--- a/test/DurableTask.Core.Tests/RetryInterceptorTests.cs
+++ b/test/DurableTask.Core.Tests/RetryInterceptorTests.cs
@@ -28,10 +28,10 @@ public async Task Invoke_WithFailingRetryCall_ShouldThrowCorrectException()
var interceptor = new RetryInterceptor