From 342aea705a7a447c25f305edaf8de99fabaa1d5f Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 5 Feb 2020 18:06:18 -0500 Subject: [PATCH] not about a history-keeper anti-pattern --- scripts/tests/test-rpc.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/tests/test-rpc.js b/scripts/tests/test-rpc.js index f655f7888..2e956cb88 100644 --- a/scripts/tests/test-rpc.js +++ b/scripts/tests/test-rpc.js @@ -161,6 +161,10 @@ var createUser = function (config, cb) { })); }).nThen(function (w) { // give the server time to write your mailbox data before checking that it's correct + // XXX chainpad-server sends an ACK before the channel has actually been created + // causing you to think that everything is good. + // without this timeout the GET_METADATA rpc occasionally returns before + // the metadata has actually been written to the disk. setTimeout(w(), 500); }).nThen(function (w) { // confirm that you own your mailbox