From 2b191470e89e2f152c4bd8935dd1449b81f95e7f Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Tue, 9 Feb 2021 23:56:41 -0800 Subject: [PATCH] Updated coreinfo test --- modules/agent-selftest.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/agent-selftest.js b/modules/agent-selftest.js index 8a020fc..a621dbc 100644 --- a/modules/agent-selftest.js +++ b/modules/agent-selftest.js @@ -224,7 +224,6 @@ function start() if (debugmode) { console.log('\n' + 'ipcPath = ' + ipcPath + '\n'); - require('ChainViewer').getSnapshot().then(function (c) { console.log(c); }); } if (ipcPath != null) @@ -400,8 +399,12 @@ function coreInfo() ret.tester = this; ret.handler = function handler(J) { + if (debugmode) { console.log(JSON.stringify(J)); } switch(J.action) { + case 'sessions': + ret._sessions = true; + break; case 'coreinfo': if (!handler.coreinfo) { @@ -473,8 +476,14 @@ function coreInfo() { if(!r.handler.coreinfo) { + if (r._sessions) + { + console.log(' -> Core Info received...............[OK]') + r._res(); + return; + } // Core Info was never recevied - r._rej(' -> Core Info received..............[FAILED]') + r._rej(' -> Core Info received...............[FAILED]') } else if(r.handler.amt) {