Skip to content

Commit

Permalink
Adjust e2e test as repeated shutdown no longer returns error
Browse files Browse the repository at this point in the history
  • Loading branch information
contrun committed Jul 8, 2024
1 parent cc429a0 commit b005e6a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,11 @@ body:json {
}

assert {
res.body.error: isDefined
res.body.result: isUndefined
res.body.error: isUndefined
res.body.result: isNull
}

script:post-response {
// Sleep for sometime to make sure current operation finishes before next request starts.
// will get error message since channel is closed in previous step
await new Promise(r => setTimeout(r, 100));
if (!(res.body.error.message === "Messaging failed because channel is closed")) {
throw new Error("Assertion failed: error message is not right");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ body:json {
}

assert {
res.body.error: isDefined
res.body.result: isUndefined
}

script:post-response {
// Sleep for sometime to make sure current operation finishes before next request starts.
// will get error message since channel is closed in previous step
await new Promise(r => setTimeout(r, 100));
if (!(res.body.error.message === "Messaging failed because channel is closed")) {
throw new Error("Assertion failed: error message is not right");
}
}
res.body.error: isUndefined
res.body.result: isNull
}
15 changes: 3 additions & 12 deletions tests/bruno/e2e/udt/12-node2-send-shutdown-channel-error.bru
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ body:json {
}

assert {
res.body.error: isDefined
res.body.result: isUndefined
}

script:post-response {
// Sleep for sometime to make sure current operation finishes before next request starts.
// will get error message since channel is closed in previous step
await new Promise(r => setTimeout(r, 100));
if (!(res.body.error.message === "Messaging failed because channel is closed")) {
throw new Error("Assertion failed: error message is not right");
}
}
res.body.error: isUndefined
res.body.result: isNull
}

0 comments on commit b005e6a

Please sign in to comment.