Skip to content

Commit

Permalink
fix: DurableClientExtensions method WaitForOrchestationStartedAsync (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dstenroejl authored Jan 15, 2025
1 parent eaae7a3 commit ffbee4b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions source/TestCommon/documents/release-notes/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# TestCommon Release notes

## Version 7.2.1

- Fix bug in class `DurableClientExtensions` method `WaitForOrchestationStartedAsync` where an exception can be thrown if an orchestration with another name exists.

## Version 7.2.0

- Extended class `DurableClientExtensions` with method `WaitForOrchestrationRunningAsync`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ limitations under the License.

<PropertyGroup>
<PackageId>Energinet.DataHub.Core.DurableFunctionApp.TestCommon</PackageId>
<PackageVersion>7.2.0$(VersionSuffix)</PackageVersion>
<PackageVersion>7.2.1$(VersionSuffix)</PackageVersion>
<Title>DurableFunctionApp TestCommon library</Title>
<Company>Energinet-DataHub</Company>
<Authors>Energinet-DataHub</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,16 @@ public static async Task<DurableOrchestrationStatus> WaitForOrchestationStartedA
{
var queryResult = await client.ListInstancesAsync(filter, CancellationToken.None).ConfigureAwait(false);

if (queryResult == null || !queryResult.DurableOrchestrationState.Any())
if (queryResult == null)
return false;

durableOrchestrationState = queryResult.DurableOrchestrationState
.Where(o => name == null || o.Name.Equals(name, StringComparison.OrdinalIgnoreCase))
.ToList();

if (durableOrchestrationState.Count == 0)
return false;

if (durableOrchestrationState.Count > 1)
throw new Exception($"Unexpected amount of orchestration instances found. Expected 1, but found {durableOrchestrationState.Count}");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ limitations under the License.

<PropertyGroup>
<PackageId>Energinet.DataHub.Core.FunctionApp.TestCommon</PackageId>
<PackageVersion>7.2.0$(VersionSuffix)</PackageVersion>
<PackageVersion>7.2.1$(VersionSuffix)</PackageVersion>
<Title>FunctionApp TestCommon library</Title>
<Company>Energinet-DataHub</Company>
<Authors>Energinet-DataHub</Authors>
Expand Down
2 changes: 1 addition & 1 deletion source/TestCommon/source/TestCommon/TestCommon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ limitations under the License.

<PropertyGroup>
<PackageId>Energinet.DataHub.Core.TestCommon</PackageId>
<PackageVersion>7.2.0$(VersionSuffix)</PackageVersion>
<PackageVersion>7.2.1$(VersionSuffix)</PackageVersion>
<Title>TestCommon library</Title>
<Company>Energinet-DataHub</Company>
<Authors>Energinet-DataHub</Authors>
Expand Down

0 comments on commit ffbee4b

Please sign in to comment.