Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor test fixes #296

Merged
merged 2 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions tests/Temporalio.Tests/Worker/WorkerVersioningTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public async Task<string> RunAsync()
[SkippableFact]
public async Task TestVersionedWorkers_Succeed()
{
throw new SkipException("Since 1.24 this test is flaky: https://github.com/temporalio/temporal/issues/6211");
#pragma warning disable IDE0035, CS0162 // We know the below is now dead code

Skip.IfNot(await ServerSupportsWorkerVersioning());

await ExecuteWorkerAsync<WaitForFinishSignal>(
Expand Down
6 changes: 4 additions & 2 deletions tests/Temporalio.Tests/Worker/WorkflowWorkerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5141,7 +5141,9 @@ await Task.WhenAll(Enumerable.Range(0, 5).Select(i =>
Assert.DoesNotContain(waiting, waiting1.Contains);
return waiting;
});
Assert.Contains(await handle.QueryAsync(wf => wf.Completed), waiting1.Contains);
Assert.All(
await handle.QueryAsync(wf => wf.Completed),
v => Assert.Contains(v, waiting1));

// Now just complete the rest
foreach (var comp in acts.UpdateCompletions.Values)
Expand All @@ -5159,7 +5161,7 @@ await Task.WhenAll(Enumerable.Range(0, 5).Select(i =>
Assert.True(completed.Count == 5);
return completed;
});
Assert.Contains(completed.GetRange(0, 2), waiting1.Contains);
Assert.All(completed.GetRange(0, 2), v => Assert.Contains(v, waiting1));
Assert.DoesNotContain(completed.GetRange(2, 3), waiting1.Contains);
},
new TemporalWorkerOptions().AddAllActivities(acts));
Expand Down