From 6f11893a2edcbd83909212e482f79101f632e52f Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Sat, 29 Jun 2024 09:34:53 +0200 Subject: [PATCH 1/2] validate mysql version 6.0 --- test/_setupTestServices.cfc | 1 + test/datasource/MySQL_Driver.cfc | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/test/_setupTestServices.cfc b/test/_setupTestServices.cfc index 8c7a4e5679..54fc17f200 100644 --- a/test/_setupTestServices.cfc +++ b/test/_setupTestServices.cfc @@ -515,6 +515,7 @@ component { // TODO hmmmf closures and this scope! server.getDefaultBundleVersion = getDefaultBundleVersion; server.getBundleVersions = getBundleVersions; + server.verifyDatasource = verifyDatasource; } public struct function getTestService( required string service, string dbFile="", diff --git a/test/datasource/MySQL_Driver.cfc b/test/datasource/MySQL_Driver.cfc index c4354366d1..6ea65b89af 100644 --- a/test/datasource/MySQL_Driver.cfc +++ b/test/datasource/MySQL_Driver.cfc @@ -80,6 +80,18 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="mysql" { var result = testConnection(); assertEquals(true, isQuery(result)); }); + + it( title='test with version 8.3.0',skip=isNotSupported(), body=function( currentSpec ) { + defineDatasource('com.mysql.cj.jdbc.Driver', 'com.mysql.cj', '8.3.0'); + var result = testConnection(); + assertEquals(true, isQuery(result)); + }); + + it( title='test with version 8.4.0',skip=isNotSupported(), body=function( currentSpec ) { + defineDatasource('com.mysql.cj.jdbc.Driver', 'com.mysql.cj', '8.4.0'); + var result = testConnection(); + assertEquals(true, isQuery(result)); + }); }); describe( title="Checking MYSQL JDBC drivers with PDT timeZone", body=function() { @@ -232,6 +244,8 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="mysql" { mySQL.bundle=arguments.bundle; mySQL.bundleVersion=arguments.bundleVersion; application action="update" datasource=mySQL; + + systemOutput("MySQL " & arguments.bundleVersion & ": " & server.verifyDatasource( mySQL ), true ); } private query function testConnection(){ From 69591dc829117480e57d266aecef00e9366211ce Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Sat, 29 Jun 2024 09:39:49 +0200 Subject: [PATCH 2/2] check that dbinfo reports the requested bundle version --- test/datasource/MySQL_Driver.cfc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/datasource/MySQL_Driver.cfc b/test/datasource/MySQL_Driver.cfc index 6ea65b89af..66a383c069 100644 --- a/test/datasource/MySQL_Driver.cfc +++ b/test/datasource/MySQL_Driver.cfc @@ -244,8 +244,11 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="mysql" { mySQL.bundle=arguments.bundle; mySQL.bundleVersion=arguments.bundleVersion; application action="update" datasource=mySQL; + var info = server.verifyDatasource( mySQL ); + // check via dbinfo that the bundle version matches + expect( info ).toInclude( arguments.bundleVersion ); + //systemOutput("MySQL " & arguments.bundleVersion & ": " & server.verifyDatasource( mySQL ), true ); - systemOutput("MySQL " & arguments.bundleVersion & ": " & server.verifyDatasource( mySQL ), true ); } private query function testConnection(){