Skip to content

Commit

Permalink
test: fixed e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
mgordel committed Oct 31, 2023
1 parent 0bff2f9 commit f06e19c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/e2e/tasks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ describe("Task Executor", function () {
logger,
});
await executor.run(async (ctx) => {
const streamOfResults = await ctx.runAndStream("echo 'Hello World'");
// for some reason we do not receive events for very simple commands,
// it is probably related to a bug where the command ends and the event does not have time to be triggered or handled
// after creating the EventSource connection to yagna... to investigate.
// for now, sleep 1 has been added, which solves the problem temporarily
const streamOfResults = await ctx.runAndStream("sleep 1 && echo 'Hello World'");
for await (const result of streamOfResults) {
expect(result.stdout).toContain("Hello World");
expect(result.result).toContain("Ok");
Expand Down

0 comments on commit f06e19c

Please sign in to comment.