diff --git a/integration-tests/__tests__/query.spec.js b/integration-tests/__tests__/query.spec.js index b843f7c30..c0a52df2c 100644 --- a/integration-tests/__tests__/query.spec.js +++ b/integration-tests/__tests__/query.spec.js @@ -73,7 +73,9 @@ describe('Query', () => { await runCommandOnDriver(conn, driver, dmp => dmp.put(sql)); } - const res = await runQueryOnDriver(conn, driver, dmp => dmp.put('SELECT ~id FROM ~t1 ORDER BY ~id')); + const res = await runQueryOnDriver(conn, driver, dmp => + dmp.put(`SELECT ~id FROM ~t1 ${engine.skipOrderBy ? '' : 'ORDER BY ~id'}`) + ); expect(res.columns).toEqual([ expect.objectContaining({ columnName: 'id', @@ -98,7 +100,11 @@ describe('Query', () => { await runCommandOnDriver(conn, driver, dmp => dmp.put(sql)); } - const results = await executeStream(driver, conn, 'SELECT ~id FROM ~t1 ORDER BY ~id'); + const results = await executeStream( + driver, + conn, + `SELECT ~id FROM ~t1 ${engine.skipOrderBy ? '' : 'ORDER BY ~id'}` + ); expect(results.length).toEqual(1); const res = results[0]; @@ -107,7 +113,7 @@ describe('Query', () => { }) ); - test.each(engines.map(engine => [engine.label, engine]))( + test.each(engines.filter(i => !i.skipOrderBy).map(engine => [engine.label, engine]))( 'More queries - %s', testWrapper(async (conn, driver, engine) => { for (const sql of initSql) { @@ -137,7 +143,9 @@ describe('Query', () => { const results = await executeStream( driver, conn, - 'CREATE TABLE ~t1 (~id int primary key); INSERT INTO ~t1 (~id) VALUES (1); INSERT INTO ~t1 (~id) VALUES (2); SELECT ~id FROM ~t1 ORDER BY ~id; ' + `CREATE TABLE ~t1 (~id int primary key); INSERT INTO ~t1 (~id) VALUES (1); INSERT INTO ~t1 (~id) VALUES (2); SELECT ~id FROM ~t1 ${ + engine.skipOrderBy ? '' : 'ORDER BY ~id' + }; ` ); expect(results.length).toEqual(1); diff --git a/integration-tests/engines.js b/integration-tests/engines.js index 908a2cbcd..ec4e237ea 100644 --- a/integration-tests/engines.js +++ b/integration-tests/engines.js @@ -622,6 +622,7 @@ const cassandraEngine = { skipNullability: true, skipUnique: true, skipIndexes: true, + skipOrderBy: true, // objects: [], };