Skip to content
This repository was archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify task.run test
Browse files Browse the repository at this point in the history
We've been seeing test flakiness when launching many tasks concurrently, likely related to #456.

For now, simplify the test.
Luke Hoban committed Apr 25, 2018

Verified

This commit was signed with the committer’s verified signature.
ctavan Christoph Tavan
1 parent 92bf37c commit cbb1c72
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion aws/aws_test.go
Original file line number Diff line number Diff line change
@@ -548,7 +548,7 @@ func containersRuntimeValidator(region string) func(t *testing.T, stackInfo inte
if !assert.True(t, exists) {
return
}
if !assert.True(t, len(hellowWorldLogs) > 16) {
if !assert.True(t, len(hellowWorldLogs) > 3) {
return
}
assert.Contains(t, getAllMessageText(hellowWorldLogs), "Hello from Docker!")
7 changes: 1 addition & 6 deletions examples/containers/index.ts
Original file line number Diff line number Diff line change
@@ -164,12 +164,7 @@ api.get("/", async (req, res) => {
});
api.get("/run", async (req, res) => {
try {
// Launch 4 instances of the Task.
let tasks: Promise<void>[] = [];
for (let i = 0; i < 4; i++) {
tasks.push(helloTask.run());
}
await Promise.all(tasks);
await helloTask.run();
res.json({ success: true });
} catch (err) {
console.error(errorJSON(err));

0 comments on commit cbb1c72

Please sign in to comment.