mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Retry queries by default in tests (#58535)
This commit is contained in:
parent
ad374efcbd
commit
000b4f878d
@ -314,13 +314,16 @@ func CreateGrafDir(t *testing.T, opts ...GrafanaOpts) (string, string) {
|
||||
_, err = logSection.NewKey("address", o.GRPCServerAddress)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
// retry queries 3 times by default
|
||||
queryRetries := 3
|
||||
if o.QueryRetries != 0 {
|
||||
queryRetries = int(o.QueryRetries)
|
||||
}
|
||||
logSection, err := getOrCreateSection("database")
|
||||
require.NoError(t, err)
|
||||
_, err = logSection.NewKey("query_retries", fmt.Sprintf("%d", o.QueryRetries))
|
||||
_, err = logSection.NewKey("query_retries", fmt.Sprintf("%d", queryRetries))
|
||||
require.NoError(t, err)
|
||||
}
|
||||
}
|
||||
|
||||
cfgPath := filepath.Join(cfgDir, "test.ini")
|
||||
err = cfg.SaveTo(cfgPath)
|
||||
|
Loading…
Reference in New Issue
Block a user