Skip to content

Commit

Permalink
Merge DT.AS V2 into main (#1132)
Browse files Browse the repository at this point in the history
  • Loading branch information
bachuv authored Jul 18, 2024
1 parent d4b98d4 commit 6d6a560
Show file tree
Hide file tree
Showing 125 changed files with 4,345 additions and 3,758 deletions.
59 changes: 0 additions & 59 deletions .github/workflows/validate-build.yml

This file was deleted.

1 change: 1 addition & 0 deletions DurableTask.sln
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Correlation.Samples", "samp
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D02EF5EF-3D7E-4223-B256-439BAF0C8853}"
ProjectSection(SolutionItems) = preProject
azure-pipelines-build.yml = azure-pipelines-build.yml
azure-pipelines-release.yml = azure-pipelines-release.yml
EndProjectSection
EndProject
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// ----------------------------------------------------------------------------------
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// 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.
// ----------------------------------------------------------------------------------
#nullable enable
namespace DurableTask.AzureStorage.Tests.Storage
{
using System.Net;
using Azure;
using Azure.Storage.Blobs.Models;
using DurableTask.AzureStorage.Storage;
using Microsoft.VisualStudio.TestTools.UnitTesting;

[TestClass]
public class DurableTaskStorageExceptionTests
{
[TestMethod]
public void MissingRequestFailedException()
{
DurableTaskStorageException exception = new((RequestFailedException)null!);
Assert.AreEqual(0, exception.HttpStatusCode);
Assert.IsFalse(exception.LeaseLost);
}

[DataTestMethod]
[DataRow(true, HttpStatusCode.Conflict, nameof(BlobErrorCode.LeaseLost))]
[DataRow(false, HttpStatusCode.Conflict, nameof(BlobErrorCode.LeaseNotPresentWithBlobOperation))]
[DataRow(false, HttpStatusCode.NotFound, nameof(BlobErrorCode.BlobNotFound))]
public void ValidRequestFailedException(bool expectedLease, HttpStatusCode statusCode, string errorCode)
{
DurableTaskStorageException exception = new(new RequestFailedException((int)statusCode, "Error!", errorCode, innerException: null));
Assert.AreEqual((int)statusCode, exception.HttpStatusCode);
Assert.AreEqual(expectedLease, exception.LeaseLost);
}
}
}

This file was deleted.

89 changes: 0 additions & 89 deletions Test/DurableTask.AzureStorage.Tests/StorageAccountDetailsTests.cs

This file was deleted.

138 changes: 0 additions & 138 deletions Test/DurableTask.AzureStorage.Tests/TimeoutHandlerTests.cs

This file was deleted.

Loading

0 comments on commit 6d6a560

Please sign in to comment.