From 2b275313a3f5244c9a91a725aa239e8d4ac11275 Mon Sep 17 00:00:00 2001 From: Michael Sun <47126816+MichaelSun90@users.noreply.github.com> Date: Fri, 4 Aug 2023 18:14:52 +0000 Subject: [PATCH] test: fix TDS 8.0 test cases not being executed correctly (#1565) --- test/integration/connection-test.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/integration/connection-test.js b/test/integration/connection-test.js index 24b111a4a..1da3b2a7d 100644 --- a/test/integration/connection-test.js +++ b/test/integration/connection-test.js @@ -532,6 +532,10 @@ describe('Encrypt Test', function() { * @param {(err: Error | null, supportsTds8?: boolean) => void} callback */ function supportsTds8(config, callback) { + if (config.options.tdsVersion < '7_2') { + return callback(null, false); + } + const connection = new Connection(config); connection.connect((err) => { @@ -549,12 +553,12 @@ describe('Encrypt Test', function() { return callback(err); } - if (!productMajorVersion || productMajorVersion < '2022') { + if (!productMajorVersion || productMajorVersion < '16') { connection.close(); return callback(null, false); } - if (productMajorVersion > '2022') { + if (productMajorVersion > '16') { connection.close(); return callback(null, true); }