diff --git a/src/Microsoft.Health.Fhir.Core/Features/Operations/Export/ExportJobTask.cs b/src/Microsoft.Health.Fhir.Core/Features/Operations/Export/ExportJobTask.cs index 02c978f1d3..ed1df9d894 100644 --- a/src/Microsoft.Health.Fhir.Core/Features/Operations/Export/ExportJobTask.cs +++ b/src/Microsoft.Health.Fhir.Core/Features/Operations/Export/ExportJobTask.cs @@ -163,7 +163,7 @@ public async Task ExecuteAsync(ExportJobRecord exportJobRecord, WeakETag weakETa _exportJobRecord.RestartCount++; } - // The intial list of query parameters will not have a continutation token. We will add that later if we get one back + // The initial list of query parameters will not have a continuation token. We will add that later if we get one back // from the search result. // As Till is a new property QueuedTime is being used as a backup incase Till doesn't exist in the job record. var tillTime = _exportJobRecord.Till != null ? _exportJobRecord.Till : new PartialDateTime(_exportJobRecord.QueuedTime); diff --git a/src/Microsoft.Health.Fhir.CosmosDb/Features/Operations/Export/CosmosExportOrchestratorJob.cs b/src/Microsoft.Health.Fhir.CosmosDb/Features/Operations/Export/CosmosExportOrchestratorJob.cs index 274e4b026e..662fc55f68 100644 --- a/src/Microsoft.Health.Fhir.CosmosDb/Features/Operations/Export/CosmosExportOrchestratorJob.cs +++ b/src/Microsoft.Health.Fhir.CosmosDb/Features/Operations/Export/CosmosExportOrchestratorJob.cs @@ -46,7 +46,7 @@ public async Task ExecuteAsync(JobInfo jobInfo, IProgress progre return JsonConvert.SerializeObject(record); } - private static ExportJobRecord CreateExportRecord(ExportJobRecord record, long groupId, string resourceType = null, PartialDateTime since = null, PartialDateTime till = null, string startSurrogateId = null, string endSurrogateId = null, string globalStartSurrogateId = null, string globalEndSurrogateId = null) + private static ExportJobRecord CreateExportRecord(ExportJobRecord record, long groupId) { var format = $"{ExportFormatTags.ResourceName}-{ExportFormatTags.Id}"; var container = record.StorageAccountContainerName; @@ -65,17 +65,17 @@ private static ExportJobRecord CreateExportRecord(ExportJobRecord record, long g record.RequestUri, record.ExportType, format, - string.IsNullOrEmpty(resourceType) ? record.ResourceType : resourceType, + record.ResourceType, record.Filters, record.Hash, record.RollingFileSizeInMB, record.RequestorClaims, - since == null ? record.Since : since, - till == null ? record.Till : till, - startSurrogateId, - endSurrogateId, - globalStartSurrogateId, - globalEndSurrogateId, + since: null, + till: null, + startSurrogateId: null, + endSurrogateId: null, + globalStartSurrogateId: null, + globalEndSurrogateId: null, record.GroupId, record.StorageAccountConnectionHash, record.StorageAccountUri, diff --git a/src/Microsoft.Health.Fhir.CosmosDb/Features/Storage/Operations/CosmosFhirOperationDataStore.cs b/src/Microsoft.Health.Fhir.CosmosDb/Features/Storage/Operations/CosmosFhirOperationDataStore.cs index dc77f05d0f..945a460a37 100644 --- a/src/Microsoft.Health.Fhir.CosmosDb/Features/Storage/Operations/CosmosFhirOperationDataStore.cs +++ b/src/Microsoft.Health.Fhir.CosmosDb/Features/Storage/Operations/CosmosFhirOperationDataStore.cs @@ -88,31 +88,31 @@ public CosmosFhirOperationDataStore( private string CollectionId { get; } - public override Task GetExportJobByIdAsync(string id, CancellationToken cancellationToken) + public override async Task GetExportJobByIdAsync(string id, CancellationToken cancellationToken) { try { - return base.GetExportJobByIdAsync(id, cancellationToken); + return await base.GetExportJobByIdAsync(id, cancellationToken); } catch (JobNotFoundException) { // try old job records var oldJobs = (ILegacyExportOperationDataStore)this; - return oldJobs.GetExportJobByIdAsync(id, cancellationToken); + return await oldJobs.GetExportJobByIdAsync(id, cancellationToken); } } - public override Task UpdateExportJobAsync(ExportJobRecord jobRecord, WeakETag eTag, CancellationToken cancellationToken) + public override async Task UpdateExportJobAsync(ExportJobRecord jobRecord, WeakETag eTag, CancellationToken cancellationToken) { try { - return base.UpdateExportJobAsync(jobRecord, eTag, cancellationToken); + return await base.UpdateExportJobAsync(jobRecord, eTag, cancellationToken); } catch (JobNotFoundException) { // try old job records var oldJobs = (ILegacyExportOperationDataStore)this; - return oldJobs.UpdateExportJobAsync(jobRecord, eTag, cancellationToken); + return await oldJobs.UpdateExportJobAsync(jobRecord, eTag, cancellationToken); } } diff --git a/src/Microsoft.Health.Fhir.SqlServer.UnitTests/Features/Operations/Export/ExportProcessingJobTests.cs b/src/Microsoft.Health.Fhir.Shared.Core.UnitTests/Features/Operations/Export/ExportProcessingJobTests.cs similarity index 98% rename from src/Microsoft.Health.Fhir.SqlServer.UnitTests/Features/Operations/Export/ExportProcessingJobTests.cs rename to src/Microsoft.Health.Fhir.Shared.Core.UnitTests/Features/Operations/Export/ExportProcessingJobTests.cs index b2ea894d01..d6d9ef243b 100644 --- a/src/Microsoft.Health.Fhir.SqlServer.UnitTests/Features/Operations/Export/ExportProcessingJobTests.cs +++ b/src/Microsoft.Health.Fhir.Shared.Core.UnitTests/Features/Operations/Export/ExportProcessingJobTests.cs @@ -12,7 +12,6 @@ using Microsoft.Health.Fhir.Core.Features.Operations.Export; using Microsoft.Health.Fhir.Core.Features.Operations.Export.Models; using Microsoft.Health.Fhir.Core.Features.Persistence; -using Microsoft.Health.Fhir.SqlServer.Features.Operations.Export; using Microsoft.Health.Fhir.Tests.Common; using Microsoft.Health.JobManagement; using Microsoft.Health.Test.Utilities; diff --git a/src/Microsoft.Health.Fhir.Shared.Core.UnitTests/Microsoft.Health.Fhir.Shared.Core.UnitTests.projitems b/src/Microsoft.Health.Fhir.Shared.Core.UnitTests/Microsoft.Health.Fhir.Shared.Core.UnitTests.projitems index 9e6590da5f..5fedbb22db 100644 --- a/src/Microsoft.Health.Fhir.Shared.Core.UnitTests/Microsoft.Health.Fhir.Shared.Core.UnitTests.projitems +++ b/src/Microsoft.Health.Fhir.Shared.Core.UnitTests/Microsoft.Health.Fhir.Shared.Core.UnitTests.projitems @@ -18,6 +18,7 @@ +