diff --git a/Jenkinsfile b/Jenkinsfile index 491e70742825fb9d655ca76321085a133c4aea63..2c2a766ecdbb5191bf45d15a809168021e3e30bc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -476,6 +476,9 @@ pipeline { ''' sh ''' + cd ${WKC}/src/connector/nodejs + npm install + npm run test cd ${WKC}/tests/examples/nodejs npm install td2.0-connector > /dev/null 2>&1 node nodejsChecker.js host=localhost diff --git a/src/connector/nodejs/test/testNanoseconds.js b/src/connector/nodejs/test/testNanoseconds.js index 85a7600b01f2c908f22e621488f22678083149ea..c3089aab3eaa4621b36297a70f2698dd08ed5988 100644 --- a/src/connector/nodejs/test/testNanoseconds.js +++ b/src/connector/nodejs/test/testNanoseconds.js @@ -3,7 +3,6 @@ var conn = taos.connect(); var c1 = conn.cursor(); let stime = new Date(); let interval = 1000; - function convertDateToTS(date) { let tsArr = date.toISOString().split("T") return "\"" + tsArr[0] + " " + tsArr[1].substring(0, tsArr[1].length - 1) + "\""; diff --git a/src/connector/nodejs/test/testUnsignedType.js b/src/connector/nodejs/test/testUnsignedType.js index 82413afebad0b75116fe3ea46e50716843d87c84..14b102972a898c582e0011698bfd7b3cd771bc42 100644 --- a/src/connector/nodejs/test/testUnsignedType.js +++ b/src/connector/nodejs/test/testUnsignedType.js @@ -1,14 +1,13 @@ const taos = require('../tdengine'); var conn = taos.connect({ host: "127.0.0.1", user: "root", password: "taosdata", config: "/etc/taos", port: 10 }); var c1 = conn.cursor(); -executeUpdate("create database nodedb;"); +executeUpdate("create database if not exists nodedb;"); executeUpdate("use nodedb;"); -executeUpdate("create table unsigntest(ts timestamp,ut tinyint unsigned,us smallint unsigned,ui int unsigned,ub bigint unsigned,bi bigint);"); +executeUpdate("create table if not exists unsigntest(ts timestamp,ut tinyint unsigned,us smallint unsigned,ui int unsigned,ub bigint unsigned,bi bigint);"); executeUpdate("insert into unsigntest values (now, 254,65534,4294967294,18446744073709551614,9223372036854775807);"); executeUpdate("insert into unsigntest values (now, 0,0,0,0,-9223372036854775807);"); executeQuery("select * from unsigntest;"); -executeUpdate("drop database nodedb;"); - +executeUpdate("drop database if exists nodedb;"); function executeUpdate(sql) { console.log(sql);