Skip to content

Commit f38d687

Browse files
test updated
1 parent 499afa5 commit f38d687

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

metadata/product/mysql/sequence/transient_race_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
)
1919

2020
// Race condition tests for Handle. These tests require a real MySQL
21-
// and will be skipped unless MYSQL_TEST_DSN and MYSQL_TEST_SCHEMA are set.
21+
// and will be skipped unless TEST_MYSQL_DSN and TEST_MYSQL_SCHEMA are set.
2222
// A temporary table with AUTO_INCREMENT PK is created and dropped automatically.
2323

2424
//Run with race detector:
@@ -33,14 +33,14 @@ import (
3333
func newTestDB(t *testing.T) (*sql.DB, string, string, string, string, int64) {
3434
t.Helper()
3535

36-
dsn := os.Getenv("MYSQL_TEST_DSN")
36+
dsn := os.Getenv("TEST_MYSQL_DSN")
3737
if dsn == "" {
38-
t.Skip("set MYSQL_TEST_DSN and MYSQL_TEST_SCHEMA to run race tests")
38+
t.Skip("set TEST_MYSQL_DSN and TEST_MYSQL_SCHEMA to run race tests")
3939
}
40-
schema := os.Getenv("MYSQL_TEST_SCHEMA")
40+
schema := os.Getenv("TEST_MYSQL_SCHEMA")
4141
catalog := ""
4242
if schema == "" {
43-
t.Skip("set MYSQL_TEST_SCHEMA to run race tests")
43+
t.Skip("set TEST_MYSQL_SCHEMA to run race tests")
4444
}
4545
records := int64(1)
4646
if v := os.Getenv("MYSQL_TEST_RECORDS"); v != "" {

metadata/product/mysql/test/insert_race_test.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,9 @@ type insertRaceEntity struct {
2828
// sessions (and different batch sizes) do not reserve/assign overlapping IDs when
2929
// inserting concurrently into the same table.
3030
func TestInsertRace_CachedSessions_MySQL(t *testing.T) {
31-
dsn := os.Getenv("MYSQL_TEST_DSN")
31+
dsn := os.Getenv("TEST_MYSQL_DSN")
3232
if dsn == "" {
33-
// Also allow alternative env used in other tests in this repo
34-
dsn = os.Getenv("TEST_MYSQL_DSN")
35-
}
36-
if dsn == "" {
37-
t.Skip("set MYSQL_TEST_DSN or TEST_MYSQL_DSN to run this test")
33+
t.Skip("set TEST_MYSQL_DSN to run this test")
3834
}
3935

4036
//os.Setenv("DEBUG_SEQUENCER", "true")

0 commit comments

Comments
 (0)