Skip to content

Commit

Permalink
fix nits from review
Browse files Browse the repository at this point in the history
  • Loading branch information
esmadau committed Aug 2, 2023
1 parent a3e0180 commit 3a5b300
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ public async Task<UpdateInstanceResponse> Handle(UpdateInstanceRequest request,
if (await AuthorizationService.CheckAccess(DataActions.Write, cancellationToken) != DataActions.Write)
throw new UnauthorizedDicomActionException(DataActions.Write);

return await _updateInstanceOperationService.QueueUpdateOperationAsync(request.UpdateSpec, cancellationToken); //
return await _updateInstanceOperationService.QueueUpdateOperationAsync(request.UpdateSpec, cancellationToken);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public async Task GivenInstanceMetadata_WhenUpdatingBlobInBatches_ThenShouldUpda
}

await _updateDurableFunction.UpdateInstanceBlobsAsync(
new UpdateInstanceBlobArguments(expected, dataset, Partition.Default),
new UpdateInstanceBlobArguments(Partition.Default, expected, dataset),
NullLogger.Instance);

foreach (var instance in expected)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public sealed class UpdateInstanceBlobArguments

public string ChangeDataset { get; }

public UpdateInstanceBlobArguments(IReadOnlyList<InstanceFileState> instanceWatermarks, string changeDataset, Partition partition)
public UpdateInstanceBlobArguments(Partition partition, IReadOnlyList<InstanceFileState> instanceWatermarks, string changeDataset)
{
EnsureArg.IsNotNull(partition, nameof(partition));
Partition = partition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text.Json;
using System.Threading;
Expand Down Expand Up @@ -123,7 +122,7 @@ await Parallel.ForEachAsync(
}

logger.LogInformation("Completed updating all instance blobs");
return new ReadOnlyCollection<WatermarkedFileProperties>(propertiesByWatermark);
return propertiesByWatermark;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public async Task UpdateInstancesAsync(
watermarkedFilePropertiesList = await context.CallActivityWithRetryAsync<IReadOnlyList<WatermarkedFileProperties>>(
nameof(UpdateInstanceBlobsAsync),
_options.RetryOptions,
new UpdateInstanceBlobArguments(instanceWatermarks, input.ChangeDataset, input.Partition));
new UpdateInstanceBlobArguments(input.Partition, instanceWatermarks, input.ChangeDataset));

await context.CallActivityWithRetryAsync(
nameof(CompleteUpdateStudyAsync),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ private async Task<VersionedInstanceIdentifier> CreateAndValidateValuesInStores(
Assert.NotNull(fileProperties);

await _fixture.IndexDataStore.EndCreateInstanceIndexAsync(1, newDataSet, version, fileProperties);

// ensure properties were saved
Assert.NotEmpty(await _fixture.IndexDataStoreTestHelper.GetFilePropertiesAsync(version));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
Expand Down Expand Up @@ -41,11 +40,6 @@ public class InstanceStoreTests : IClassFixture<SqlDataStoreTestsFixture>
private readonly IQueryStore _queryStore;
private readonly IChangeFeedStore _changeFeedStore;
private readonly SqlDataStoreTestsFixture _fixture;
private static readonly FileProperties DefaultFileProperties = new FileProperties
{
Path = String.Empty,
ETag = String.Empty
};

public InstanceStoreTests(SqlDataStoreTestsFixture fixture)
{
Expand Down

0 comments on commit 3a5b300

Please sign in to comment.