Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions FileProcessor.IntegrationTests/Features/SharedSteps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace FileProcessor.IntegrationTests.Features
using System.Threading;
using Common;
using DataTransferObjects;
using DataTransferObjects.Responses;
using Newtonsoft.Json;
using Shared.IntegrationTesting;
using Shouldly;
Expand Down Expand Up @@ -45,7 +46,20 @@ public async Task GivenIUploadThisFileForProcessing(Table table)
{
var fileId = await this.UploadFile(table);

var estate = this.TestingContext.GetEstateDetails(table.Rows.First());
Guid estateId = estate.EstateId;

fileId.ShouldNotBe(Guid.Empty);
estateId.ShouldNotBe(Guid.Empty);

await Retry.For(async () =>
{
FileDetails fileDetails =
await this.TestingContext.DockerHelper.FileProcessorClient.GetFile(this.TestingContext.AccessToken, estate.EstateId, fileId, CancellationToken.None);

fileDetails.ShouldNotBeNull();
fileDetails.ProcessingCompleted.ShouldBeTrue();
}, TimeSpan.FromMinutes(3));
}

[Given(@"I upload this file for processing an error should be returned indicating the file is a duplicate")]
Expand Down Expand Up @@ -89,10 +103,7 @@ private async Task<Guid> UploadFile(Table table)
fileData,
uploadFileRequest,
CancellationToken.None);

// Now we need to wait some time to let the file be processed
await Task.Delay(TimeSpan.FromMinutes(1));


return fileId;
}

Expand Down