fix: sqlite nocgo with ionice and parallel flag (#112849)
* chore: log test DB path * fix: run sqlite_nocgo with parallel 4 and ionice to reduce IO operations
This commit is contained in:
@@ -101,7 +101,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
readarray -t PACKAGES <<< "$(./scripts/ci/backend-tests/pkgs-with-tests-named.sh -b TestIntegration | ./scripts/ci/backend-tests/shard.sh -N"$SHARD" -d-)"
|
readarray -t PACKAGES <<< "$(./scripts/ci/backend-tests/pkgs-with-tests-named.sh -b TestIntegration | ./scripts/ci/backend-tests/shard.sh -N"$SHARD" -d-)"
|
||||||
CGO_ENABLED=0 go test -tags=sqlite -timeout=8m -run '^TestIntegration' "${PACKAGES[@]}"
|
# ionice since tests are IO intensive
|
||||||
|
CGO_ENABLED=0 ionice -c2 -n7 go test -p=4 -tags=sqlite -timeout=8m -run '^TestIntegration' "${PACKAGES[@]}"
|
||||||
mysql:
|
mysql:
|
||||||
needs: detect-changes
|
needs: detect-changes
|
||||||
if: needs.detect-changes.outputs.changed == 'true'
|
if: needs.detect-changes.outputs.changed == 'true'
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ func StartGrafanaEnv(t *testing.T, grafDir, cfgPath string) (string, *server.Tes
|
|||||||
dbCfg.Key("password").SetValue(testDB.Password)
|
dbCfg.Key("password").SetValue(testDB.Password)
|
||||||
dbCfg.Key("name").SetValue(testDB.Database)
|
dbCfg.Key("name").SetValue(testDB.Database)
|
||||||
|
|
||||||
t.Log("Using test database", "type", testDB.DriverName, "host", testDB.Host, "port", testDB.Port, "user", testDB.User, "name", testDB.Database)
|
t.Log("Using test database", "type", testDB.DriverName, "host", testDB.Host, "port", testDB.Port, "user", testDB.User, "name", testDB.Database, "path", testDB.Path)
|
||||||
|
|
||||||
env, err := server.InitializeForTest(ctx, t, t, cfg, serverOpts, apiServerOpts)
|
env, err := server.InitializeForTest(ctx, t, t, cfg, serverOpts, apiServerOpts)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|||||||
Reference in New Issue
Block a user