From f06e4b25440f3cc2c167c441c17678dc7de27edc Mon Sep 17 00:00:00 2001 From: Wu Jian Ping Date: Fri, 22 Jul 2022 13:44:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0bench=20app=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=AF=94=E5=AF=B9=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- binding/nodejs/tests/bench.app.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/binding/nodejs/tests/bench.app.js b/binding/nodejs/tests/bench.app.js index c2c4ff2..693dc8e 100644 --- a/binding/nodejs/tests/bench.app.js +++ b/binding/nodejs/tests/bench.app.js @@ -91,7 +91,14 @@ const main = async () => { const mipInt = Math.floor((sipInt + eipInt) / 2) const mip = intToIp(mipInt) - await searcher.search(mip) + const info = await searcher.search(mip) + + const region = list.slice(2, list.length).join('|') + // check the region info + if (region !== info.region) { + console.log(`failed search(${mip}) with (${region} != ${info.region})`) + process.exit(1) + } total++ }) .on('error', err => {