diff --git a/.github/workflows/ci-bun.yml b/.github/workflows/ci-bun.yml index 14ddb03faa..1fdd612ed6 100644 --- a/.github/workflows/ci-bun.yml +++ b/.github/workflows/ci-bun.yml @@ -20,10 +20,19 @@ jobs: strategy: fail-fast: false matrix: - bun-version: [0.5.1] + bun-version: [0.5.1, canary] mysql-version: ["mysql:5.7", "mysql:8.0.18", "mysql:8.0.22"] use-compression: [0] use-tls: [0] + include: + - bun-version: "0.5.1" + mysql-version: "mysql:8.0.22" + use-compression: 1 + use-tls: 0 + - bun-version: "canary" + mysql-version: "mysql:8.0.22" + use-compression: 1 + use-tls: 0 name: Bun ${{ matrix.bun-version }} - DB ${{ matrix.mysql-version }} - SSL=${{matrix.use-tls}} Compression=${{matrix.use-compression}} @@ -59,4 +68,4 @@ jobs: - name: Run tests # todo: run full test suite once test createServer is implemented using Bun.listen - run: FILTER=test-select MYSQL_PORT=3306 bun run test \ No newline at end of file + run: MYSQL_USE_COMPRESSION=${{ matrix.use-compression }} FILTER=test-select-1 MYSQL_PORT=3306 bun run test \ No newline at end of file diff --git a/lib/compressed_protocol.js b/lib/compressed_protocol.js index 67a7c39c32..75ab4466b2 100644 --- a/lib/compressed_protocol.js +++ b/lib/compressed_protocol.js @@ -7,6 +7,7 @@ const zlib = require('zlib'); const PacketParser = require('./packet_parser.js'); function handleCompressedPacket(packet) { + console.log('Handle compressed packet!!!'); // eslint-disable-next-line consistent-this, no-invalid-this const connection = this; const deflatedLength = packet.readInt24(); @@ -14,6 +15,7 @@ function handleCompressedPacket(packet) { if (deflatedLength !== 0) { connection.inflateQueue.push(task => { + console.log('inflate Body:::', Array.from(body)); zlib.inflate(body, (err, data) => { if (err) { connection._handleNetworkError(err); @@ -102,6 +104,7 @@ function writeCompressed(buffer) { } function enableCompression(connection) { + console.log('Enabling compression!!!') connection._lastWrittenPacketId = 0; connection._lastReceivedPacketId = 0; diff --git a/test/common.js b/test/common.js index d06f327957..98d72e32bc 100644 --- a/test/common.js +++ b/test/common.js @@ -34,7 +34,7 @@ exports.waitDatabaseReady = function(callback) { conn.once('error', err => { if (err.code !== 'PROTOCOL_CONNECTION_LOST' && err.code !== 'ETIMEDOUT') { console.log('Unexpected error waiting for connection', err); - process.exit(-1); + process.exit(1); } try { conn.close(); @@ -80,6 +80,8 @@ exports.createConnection = function(args) { connectTimeout: args && args.connectTimeout, }; + console.log('create connection:', params) + // previously we had an adapter logic to benchmark against mysqljs/mysql and libmariaclient const driver = require('../index.js'); const conn = driver.createConnection(params); diff --git a/test/integration/connection/test-multiple-results.js b/test/integration/connection/test-multiple-results.js index e9be7febe4..316c43ff1f 100644 --- a/test/integration/connection/test-multiple-results.js +++ b/test/integration/connection/test-multiple-results.js @@ -130,7 +130,7 @@ function do_test(testIndex) { } if (err) { console.log(err); - process.exit(-1); + process.exit(1); } const arrOrColumn = function(c) { if (Array.isArray(c)) { diff --git a/test/integration/connection/test-select-1.js b/test/integration/connection/test-select-1.js index b7066bda6c..8e7edce20b 100644 --- a/test/integration/connection/test-select-1.js +++ b/test/integration/connection/test-select-1.js @@ -5,7 +5,6 @@ const common = require('../../common'); const connection = common.createConnection(); connection.query('SELECT 1', (err, rows, fields) => { - console.log('query callback', err, rows, fields); assert.ifError(err); assert.deepEqual(rows, [{ 1: 1 }]); assert.equal(fields[0].name, '1'); diff --git a/test/unit/pool-cluster/test-connection-restore.js b/test/unit/pool-cluster/test-connection-restore.js index 11f7ab918d..07bb8a849d 100644 --- a/test/unit/pool-cluster/test-connection-restore.js +++ b/test/unit/pool-cluster/test-connection-restore.js @@ -1,7 +1,7 @@ 'use strict'; if (process.platform === 'win32') { - console.log('This test is known to fail on windows. FIXME: investi=gate why'); + console.log('This test is known to fail on windows. FIXME: investigate why'); process.exit(0); }