From cb515f0b4167618448491de26b27e667a240e470 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 4 Nov 2024 18:10:06 -0500 Subject: [PATCH] Fix MySQL test breakage caused by daylight savings change Seriously, it broke due to the DST change because it just *happen* to match the -5 hours window used for the test. The fix is to move the test that changes the instance's timezone to its own, isolated, MySQL so it doesn't interfere with the other tests --- internal/datastore/mysql/datastore_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/datastore/mysql/datastore_test.go b/internal/datastore/mysql/datastore_test.go index 671749f595..fb197e2e58 100644 --- a/internal/datastore/mysql/datastore_test.go +++ b/internal/datastore/mysql/datastore_test.go @@ -106,6 +106,11 @@ func TestMySQL8Datastore(t *testing.T) { additionalMySQLTests(t, b) } +func TestMySQLRevisionTimestamps(t *testing.T) { + b := testdatastore.RunMySQLForTestingWithOptions(t, testdatastore.MySQLTesterOptions{MigrateForNewDatastore: true}, "") + t.Run("TransactionTimestamps", createDatastoreTest(b, TransactionTimestampsTest, defaultOptions...)) +} + func additionalMySQLTests(t *testing.T, b testdatastore.RunningEngineForTest) { reg := prometheus.NewRegistry() prometheus.DefaultGatherer = reg @@ -122,7 +127,6 @@ func additionalMySQLTests(t *testing.T, b testdatastore.RunningEngineForTest) { t.Run("ChunkedGarbageCollection", createDatastoreTest(b, ChunkedGarbageCollectionTest, defaultOptions...)) t.Run("EmptyGarbageCollection", createDatastoreTest(b, EmptyGarbageCollectionTest, defaultOptions...)) t.Run("NoRelationshipsGarbageCollection", createDatastoreTest(b, NoRelationshipsGarbageCollectionTest, defaultOptions...)) - t.Run("TransactionTimestamps", createDatastoreTest(b, TransactionTimestampsTest, defaultOptions...)) t.Run("QuantizedRevisions", func(t *testing.T) { QuantizedRevisionTest(t, b) })