Replace remaining GetMaster() queries (#19545)
There are still some remaining which access the raw DB struct. There will be a separate PR to clean those up. ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
256427f7f9
Коммит
678c7d3b8c
@@ -90,7 +90,7 @@ func StoreTestWithSqlStore(t *testing.T, f func(*testing.T, store.Store, storete
|
||||
if testing.Short() {
|
||||
t.SkipNow()
|
||||
}
|
||||
f(t, st.Store, st.SqlStore)
|
||||
f(t, st.Store, &StoreTestWrapper{st.SqlStore})
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -760,7 +760,7 @@ func TestExecNoTimeout(t *testing.T) {
|
||||
} else if sqlStore.DriverName() == model.DatabaseDriverPostgres {
|
||||
query = `SELECT pg_sleep(2);`
|
||||
}
|
||||
_, err := sqlStore.GetMaster().ExecNoTimeout(query)
|
||||
_, err := sqlStore.GetMasterX().ExecNoTimeout(query)
|
||||
require.NoError(t, err)
|
||||
})
|
||||
}
|
||||
@@ -781,6 +781,6 @@ func TestMySQLReadTimeout(t *testing.T) {
|
||||
store.initConnection()
|
||||
defer store.Close()
|
||||
|
||||
_, err = store.GetMaster().ExecNoTimeout(`SELECT SLEEP(3)`)
|
||||
_, err = store.GetMasterX().ExecNoTimeout(`SELECT SLEEP(3)`)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user