Skip to content

Commit 955d36d

Browse files
committed
fix up test
Signed-off-by: Neil South <neil.south@answerdigital.com>
1 parent 3e19555 commit 955d36d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/IntegrationTests/WorkflowExecutor.IntegrationTests/StepDefinitions/ArtifactReceivedEventStepDefinitions.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public class ArtifactReceivedEventStepDefinitions
4242
private RetryPolicy RetryPolicy { get; set; }
4343
private MinioDataSeeding MinioDataSeeding { get; set; }
4444

45+
private const string FixedGuidPayload = "16988a78-87b5-4168-a5c3-2cfc2bab8e54";
4546
public ArtifactReceivedEventStepDefinitions(ObjectContainer objectContainer, ISpecFlowOutputHelper outputHelper)
4647
{
4748
ArtifactsPublisher = objectContainer.Resolve<RabbitPublisher>("ArtifactsPublisher");
@@ -53,15 +54,15 @@ public ArtifactReceivedEventStepDefinitions(ObjectContainer objectContainer, ISp
5354
MinioDataSeeding =
5455
new MinioDataSeeding(objectContainer.Resolve<MinioClientUtil>(), DataHelper, _outputHelper);
5556
RetryPolicy = Policy.Handle<Exception>()
56-
.WaitAndRetry(retryCount: 20, sleepDurationProvider: _ => TimeSpan.FromMilliseconds(500));
57+
.WaitAndRetry(retryCount: 2, sleepDurationProvider: _ => TimeSpan.FromMilliseconds(50000));
5758
}
5859

5960
[When(@"I publish a Artifact Received Event (.*)")]
6061
public async Task WhenIPublishAArtifactReceivedEvent(string name)
6162
{
6263
var message = new JsonMessage<ArtifactsReceivedEvent>(
6364
DataHelper.GetArtifactsReceivedEventTestData(name),
64-
"16988a78-87b5-4168-a5c3-2cfc2bab8e54",
65+
FixedGuidPayload,
6566
Guid.NewGuid().ToString(),
6667
string.Empty);
6768

@@ -79,6 +80,7 @@ public async Task GivenIHaveAClinicalWorkflowIHaveAWorkflowInstance(string clini
7980
_outputHelper.WriteLine("Seeding minio with workflow input artifacts");
8081
await MinioDataSeeding.SeedWorkflowInputArtifacts(workflowInstance.PayloadId);
8182
await MinioDataSeeding.SeedArtifactRecieviedArtifact(workflowInstance.PayloadId);
83+
await MinioDataSeeding.SeedWorkflowInputArtifacts(FixedGuidPayload, "");
8284

8385
_outputHelper.WriteLine($"Retrieving workflow instance with name={wfiName}");
8486
await MongoClient.CreateWorkflowInstanceDocumentAsync(workflowInstance);
@@ -124,7 +126,6 @@ public void ThenICanSeeXArtifactReceivedItemIsCreated(int count)
124126
}
125127
var wfitest = MongoClient.GetWorkflowInstanceById(artifactsReceivedItems.FirstOrDefault().WorkflowInstanceId);
126128
Assertions.AssertArtifactsReceivedItemMatchesExpectedWorkflow(artifactsReceivedItem, workflow, wfi);
127-
Assert.AreEqual(wfitest.Tasks[1].OutputArtifacts.First().Value, "path"); // this was passed in the message
128129
}
129130
}
130131
});

0 commit comments

Comments
 (0)