You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by al...@apache.org on 2020/12/23 22:10:56 UTC
[openwhisk-wskdebug] 01/11: making flaky test more stable
This is an automated email from the ASF dual-hosted git repository.
alexkli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-wskdebug.git
commit f6d369941ae3967f91fb5ef8f796c9cdaf8ba310
Author: Alexander Klimetschek <ak...@adobe.com>
AuthorDate: Tue Dec 22 21:48:47 2020 -0800
making flaky test more stable
---
test/nodejs.test.js | 4 ++--
test/test.js | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/test/nodejs.test.js b/test/nodejs.test.js
index 7369529..4608187 100644
--- a/test/nodejs.test.js
+++ b/test/nodejs.test.js
@@ -490,7 +490,7 @@ describe('nodejs', function() {
{ msg: "CORRECT/RESULT" },
async () => {
// change action.js to test reloading
- console.log("simulating modifiying action.js...");
+ console.log("[test] simulating modifiying action.js...");
fs.writeFileSync(`action.js`,
`
@@ -501,7 +501,7 @@ describe('nodejs', function() {
}
`);
- await sleep(1);
+ await sleep(100);
},
{ msg: "SECOND" },
true // binary
diff --git a/test/test.js b/test/test.js
index ce8904d..74ac79d 100644
--- a/test/test.js
+++ b/test/test.js
@@ -282,6 +282,7 @@ function mockActionDoubleInvocation(action, code, params, result1, runBetween, r
nockActivation(
action,
body => {
+ console.log("[test] mockActionDoubleInvocation: asserting result1")
assert.deepStrictEqual(body, result1);
return true;
}
@@ -298,8 +299,8 @@ function mockActionDoubleInvocation(action, code, params, result1, runBetween, r
result2.$activationId = activationId2;
nockActivation(action, body => body.$waitForActivation === true)
- .reply(200, () => {
- runBetween();
+ .reply(200, async () => {
+ await runBetween();
return {
response: {
result: Object.assign(params, { $activationId: activationId2 })
@@ -311,6 +312,7 @@ function mockActionDoubleInvocation(action, code, params, result1, runBetween, r
nockActivation(
action,
body => {
+ console.log("[test] mockActionDoubleInvocation: asserting result2")
assert.deepStrictEqual(body, result2);
return true;
}