diff --git a/test/Microsoft.Health.Fhir.Shared.Tests.Integration/Features/Operations/Reindex/ReindexJobTests.cs b/test/Microsoft.Health.Fhir.Shared.Tests.Integration/Features/Operations/Reindex/ReindexJobTests.cs index f31a7030fc..aec14df869 100644 --- a/test/Microsoft.Health.Fhir.Shared.Tests.Integration/Features/Operations/Reindex/ReindexJobTests.cs +++ b/test/Microsoft.Health.Fhir.Shared.Tests.Integration/Features/Operations/Reindex/ReindexJobTests.cs @@ -45,6 +45,7 @@ using Newtonsoft.Json; using NSubstitute; using Xunit; +using Xunit.Abstractions; using Task = System.Threading.Tasks.Task; namespace Microsoft.Health.Fhir.Tests.Integration.Features.Operations.Reindex @@ -73,6 +74,7 @@ public class ReindexJobTests : IClassFixture, IAsyncLif private SearchParameterStatusManager _searchParameterStatusManager2; private readonly ISearchParameterSupportResolver _searchParameterSupportResolver = Substitute.For(); + private readonly ITestOutputHelper _output; private ReindexJobWorker _reindexJobWorker; private IScoped _searchService; @@ -82,10 +84,11 @@ public class ReindexJobTests : IClassFixture, IAsyncLif private ISearchParameterOperations _searchParameterOperations2 = null; private readonly IDataStoreSearchParameterValidator _dataStoreSearchParameterValidator = Substitute.For(); - public ReindexJobTests(FhirStorageTestsFixture fixture) + public ReindexJobTests(FhirStorageTestsFixture fixture, ITestOutputHelper output) { _fixture = fixture; _testHelper = _fixture.TestHelper; + _output = output; } public async Task InitializeAsync() @@ -838,6 +841,9 @@ private async Task PerformReindexingOperation( } } + var serializer = new FhirJsonSerializer(); + _output.WriteLine(serializer.SerializeToString(reindexJobWrapper.ToParametersResourceElement().ToPoco())); + Assert.True( operationStatus == reindexJobWrapper.JobRecord.Status, $"Current job status '{reindexJobWrapper.JobRecord.Status}'. Expected job status '{operationStatus}'. Number of attempts: {delayCount}. Time elapsed: {stopwatch.Elapsed}.");