Skip to content

Commit

Permalink
add wait time
Browse files Browse the repository at this point in the history
  • Loading branch information
v1r3n committed Mar 19, 2024
1 parent 0b20196 commit bf4c1fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Tests/Api/WorkflowResourceApiTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ public void TestWorkflowOperations()

workflow = _workflowClient.GetWorkflow(workflowId, true);

System.Threading.Thread.Sleep(5000);

// There should be 3 tasks
_testOutputHelper.WriteLine(
$"Number of tasks in workflow is {workflow.Tasks.Count} and last task is {workflow.Tasks.Last().ReferenceTaskName}");
Expand All @@ -281,7 +283,7 @@ public void TestWorkflowOperations()
// Search for workflows
var startTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds() * 1000;
var searchResults = _workflowClient.Search(start: 0, size: 10, freeText: "*",
query: $"correlationId = '{correlationId}' AND startTime > {startTime} AND startTime < {startTime + 86400000}");
query: $"correlationId = '{correlationId}'");
_testOutputHelper.WriteLine(
$"Found {searchResults.Results.Count} execution with correlation_id '{correlationId}'");
Assert.Single(searchResults.Results);
Expand Down

0 comments on commit bf4c1fc

Please sign in to comment.