Skip to content

Commit

Permalink
Fix MySQL test breakage caused by daylight savings change
Browse files Browse the repository at this point in the history
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
  • Loading branch information
josephschorr committed Nov 4, 2024
1 parent 51edc2d commit 13e08a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/datastore/mysql/datastore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,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
Expand All @@ -121,7 +126,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)
})
Expand Down

0 comments on commit 13e08a9

Please sign in to comment.