From 576378157271d8065922852787d0eed748eaa6e9 Mon Sep 17 00:00:00 2001 From: Jillian Crossley Date: Wed, 26 Jun 2024 13:55:42 +0000 Subject: [PATCH] finagle/finagle-mysql: Update the expected mysql version for integration tests to 8.0.21 Problem MySql version 5.7 is EOL, but we were using it for integration tests. Solution Update expected version to more modern 8.0.21, and add README to the integration tests noting the expected location for this installation in order for the tests to run. Differential Revision: https://phabricator.twitter.biz/D1152235 --- CHANGELOG.rst | 6 ++++++ .../scala/com/twitter/finagle/mysql/integration/README | 8 ++++++++ .../com/twitter/finagle/mysql/integration/TypeTest.scala | 9 ++++++--- .../com/twitter/finagle/mysql/integration/package.scala | 9 +++++++-- 4 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/README diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6e1fb413143..34c279178ac 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,12 @@ Note that ``PHAB_ID=#`` and ``RB_ID=#`` correspond to associated messages in com Unreleased ---------- +Runtime Behavior Changes +~~~~~~~~~~~~~~~~~~~~~~~~ + +* finagle-mysql: (Testing behaviour change only) Updated mysql version expected by integration tests to 8.0.21. + Added README in integration tests noting that this must exist for integration tests to run. ``PHAB_ID=D1152235`` + 24.5.0 ------ diff --git a/finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/README b/finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/README new file mode 100644 index 00000000000..4b2de4aab1a --- /dev/null +++ b/finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/README @@ -0,0 +1,8 @@ +In order for the integration tests to run, a mysql installation must exist at: + +/tmp/.embedded_mysql/8.0.21 + +(The version defined by `defaultInstanceConfig` in +finagle/finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/package.scala) + +You can download this from: https://dev.mysql.com/downloads/mysql/ diff --git a/finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/TypeTest.scala b/finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/TypeTest.scala index 29b98467921..aecb1283900 100644 --- a/finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/TypeTest.scala +++ b/finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/TypeTest.scala @@ -1,15 +1,18 @@ package com.twitter.finagle.mysql.integration import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.module.scala.{DefaultScalaModule, ScalaObjectMapper} +import com.fasterxml.jackson.module.scala.DefaultScalaModule +import com.fasterxml.jackson.module.scala.ScalaObjectMapper import com.twitter.finagle.mysql._ import com.twitter.finagle.mysql.harness.EmbeddedSimpleSuite -import com.twitter.finagle.mysql.harness.config.{DatabaseConfig, InstanceConfig} +import com.twitter.finagle.mysql.harness.config.DatabaseConfig +import com.twitter.finagle.mysql.harness.config.InstanceConfig import com.twitter.finagle.mysql.param.UnsignedColumns import com.twitter.util.TwitterDateFormat import java.sql.Timestamp import java.util.TimeZone -import org.scalactic.{Equality, TolerantNumerics} +import org.scalactic.Equality +import org.scalactic.TolerantNumerics object NumericTypeTest { val createTableQuery: String = diff --git a/finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/package.scala b/finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/package.scala index 48d20fa07e0..2040d85f8f4 100644 --- a/finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/package.scala +++ b/finagle-mysql/src/test/scala/com/twitter/finagle/mysql/integration/package.scala @@ -1,6 +1,8 @@ package com.twitter.finagle.mysql -import com.twitter.finagle.mysql.harness.config.{DatabaseConfig, InstanceConfig, MySqlVersion} +import com.twitter.finagle.mysql.harness.config.DatabaseConfig +import com.twitter.finagle.mysql.harness.config.InstanceConfig +import com.twitter.finagle.mysql.harness.config.MySqlVersion package object integration { @@ -50,8 +52,11 @@ package object integration { /** * This is the default InstanceConfig used by the integration package. * This will look for mysql binaries in java.io.tmpdir. + * + * When updating this, please update the README in this folder to specify the expected + * installation location. */ - val defaultInstanceConfig: InstanceConfig = InstanceConfig(v5_7_28) + val defaultInstanceConfig: InstanceConfig = InstanceConfig(v8_0_21) val defaultDatabaseConfig: DatabaseConfig = DatabaseConfig(databaseName = "a_database", users = Seq.empty, setupQueries = Seq.empty) }