mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 03:31:50 +08:00
Chore: Attempt to reduce flakiness in integration tests (#97247)
* sqlstore/sqlutil: set sync=OFF for sqlite in tests if wal=true * testinfra: set max open/idle conn to 2 to match e2e tests
This commit is contained in:
@ -110,7 +110,8 @@ func sqLite3TestDB() (*TestDB, error) {
|
||||
|
||||
ret.ConnStr = "file:" + sqliteDb + "?cache=private&mode=rwc"
|
||||
if os.Getenv("SQLITE_JOURNAL_MODE") != "false" {
|
||||
ret.ConnStr += "&_journal_mode=WAL"
|
||||
// For tests, set sync=OFF for faster commits. Reference: https://www.sqlite.org/pragma.html#pragma_synchronous.
|
||||
ret.ConnStr += "&_journal_mode=WAL&_synchronous=OFF"
|
||||
}
|
||||
ret.Path = sqliteDb
|
||||
|
||||
|
Reference in New Issue
Block a user