Skip to content

Commit f5e43b0

Browse files
committed
[misc] add maxscale CI testing
1 parent 103be52 commit f5e43b0

File tree

5 files changed

+34
-25
lines changed

5 files changed

+34
-25
lines changed

test/integration/batch.test.js

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,29 +1473,31 @@ describe.sequential(
14731473
{ affectedRows: 1, insertId: 0n, warningStatus: 0 }
14741474
]);
14751475
} else {
1476-
assert.deepEqual(res, { affectedRows: 4, insertId: 0n, warningStatus: 0 });
1477-
}
1478-
if (supportBulkUnitResults) {
1479-
res = await connBulk.batch({ sql: 'INSERT INTO bufLength VALUES (?)', fullResult: true }, [
1480-
['abc'],
1481-
['cde'],
1482-
[1],
1483-
[new Date('2001-12-31 23:59:58')]
1484-
]);
14851476
assert.deepEqual(res, [
1486-
{ affectedRows: 1, insertId: 0n, warningStatus: 0 },
1487-
{ affectedRows: 1, insertId: 0n, warningStatus: 0 },
1477+
{ affectedRows: 2, insertId: 0n, warningStatus: 0 },
14881478
{ affectedRows: 1, insertId: 0n, warningStatus: 0 },
14891479
{ affectedRows: 1, insertId: 0n, warningStatus: 0 }
14901480
]);
1491-
res = await connBulk.batch({ sql: 'INSERT INTO bufLength VALUES (?)', fullResult: false }, [
1492-
['abc'],
1493-
['cde'],
1494-
[1],
1495-
[new Date('2001-12-31 23:59:58')]
1496-
]);
1497-
assert.deepEqual(res, { affectedRows: 4, insertId: 0n, warningStatus: 0 });
14981481
}
1482+
res = await connBulk.batch({ sql: 'INSERT INTO bufLength VALUES (?)', fullResult: true }, [
1483+
['abc'],
1484+
['cde'],
1485+
[1],
1486+
[new Date('2001-12-31 23:59:58')]
1487+
]);
1488+
assert.deepEqual(res, [
1489+
{ affectedRows: 1, insertId: 0n, warningStatus: 0 },
1490+
{ affectedRows: 1, insertId: 0n, warningStatus: 0 },
1491+
{ affectedRows: 1, insertId: 0n, warningStatus: 0 },
1492+
{ affectedRows: 1, insertId: 0n, warningStatus: 0 }
1493+
]);
1494+
res = await connBulk.batch({ sql: 'INSERT INTO bufLength VALUES (?)', fullResult: false }, [
1495+
['abc'],
1496+
['cde'],
1497+
[1],
1498+
[new Date('2001-12-31 23:59:58')]
1499+
]);
1500+
assert.deepEqual(res, { affectedRows: 4, insertId: 0n, warningStatus: 0 });
14991501
await connBulk.end();
15001502
});
15011503

test/integration/connection.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,14 +335,14 @@ describe.concurrent('connection', () => {
335335

336336
test('connection.destroy() when executing', async () => {
337337
const conn = await createConnection();
338-
conn.query('SELECT 1');
339-
conn.destroy();
338+
conn.query('SELECT 1').catch((err) => {});
339+
await conn.destroy();
340340
}, 10000);
341341

342342
test('connection.close alias', async () => {
343343
const conn = await createConnection({ keepAliveDelay: 100 });
344-
conn.query('SELECT 1');
345-
conn.close();
344+
conn.query('SELECT 1').catch((err) => {});
345+
await conn.close();
346346
}, 10000);
347347

348348
test('connection.destroy() during query execution', async ({ skip }) => {

test/integration/file.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ describe('sql file import', () => {
238238
});
239239
}, 30000);
240240

241-
test('simple file import with direct connection options', async () => {
241+
test('simple file import with direct connection options', async ({skip}) => {
242+
if (isMaxscale(shareConn)) return skip();
242243
await new Promise((resolve, reject) => {
243244
baseCallback.importFile(
244245
Object.assign({}, Conf.baseConfig, { file: __dirname + '/../tools/data-dump.sql', database: 'fimp' }),

test/integration/redirection.test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,13 @@ describe.concurrent('redirection', () => {
6666
proxy.close();
6767
return skip();
6868
}
69-
let conn = await createConnection({ host: 'localhost', port: proxy.port(), permitRedirect: true, debug: true });
69+
let conn = await createConnection({
70+
host: 'localhost',
71+
port: proxy.port(),
72+
permitRedirect: true,
73+
debug: true,
74+
debugLen: 1024
75+
});
7076
try {
7177
assert.equal(Conf.baseConfig.host, conn.info.host);
7278
assert.equal(Conf.baseConfig.port, conn.info.port);

test/integration/ssl.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ describe.concurrent('ssl', function () {
166166
if (
167167
!isMaxscaleEphemeral &&
168168
!shareConn.info.isMariaDB() &&
169-
(!shareConn.info.hasMinVersion(11, 4, 0) || shareConn.info.hasMinVersion(23, 0, 0))
169+
!shareConn.info.hasMinVersion(11, 4, 0)
170170
) {
171171
throw new Error('Must have thrown an exception !');
172172
}

0 commit comments

Comments
 (0)