Skip to content

Commit

Permalink
finagle/finagle-mysql: Update the expected mysql version for integrat…
Browse files Browse the repository at this point in the history
…ion 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
  • Loading branch information
jcrossley authored and jenkins committed Jun 26, 2024
1 parent 7111467 commit 5763781
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
------

Expand Down
Original file line number Diff line number Diff line change
@@ -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/
Original file line number Diff line number Diff line change
@@ -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 =
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {

Expand Down Expand Up @@ -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)
}

0 comments on commit 5763781

Please sign in to comment.