From b2e5d3d0f520f15beee61bfba1857dcc1bd7aabe Mon Sep 17 00:00:00 2001 From: Tobias Gurtzick Date: Sun, 10 Sep 2023 15:04:09 +0200 Subject: [PATCH] fix test case for mysql > 8 Signed-off-by: Tobias Gurtzick --- test/mysql_test.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/mysql_test.js b/test/mysql_test.js index ef6ee43..8bba6dd 100644 --- a/test/mysql_test.js +++ b/test/mysql_test.js @@ -289,7 +289,12 @@ lab.experiment('mysql', () => { expect(primaryColumn.meta.column_key).to.equal('PRI'); // Testing the "after" constraint - expect(columns[1].getName()).to.equal('date'); + // mysql > 8 does not return the same way anymore, + // results may be in random order, so we check explicitly + // the element with ordinal position 2 + expect( + columns.find((x) => x.meta.ordinal_position === 2).getName() + ).to.equal('date'); }); });