mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: add query_retries=3
to querylibrary_integration_test.go
(#57607)
This commit is contained in:
parent
cc820062c6
commit
a63c529ad1
@ -57,6 +57,7 @@ func createTestContext(t *testing.T) testContext {
|
||||
|
||||
dir, path := testinfra.CreateGrafDir(t, testinfra.GrafanaOpts{
|
||||
EnableFeatureToggles: []string{featuremgmt.FlagPanelTitleSearch, featuremgmt.FlagQueryLibrary},
|
||||
QueryRetries: 3,
|
||||
})
|
||||
grafanaListedAddr, env := testinfra.StartGrafanaEnv(t, dir, path)
|
||||
|
||||
|
@ -314,6 +314,12 @@ func CreateGrafDir(t *testing.T, opts ...GrafanaOpts) (string, string) {
|
||||
_, err = logSection.NewKey("address", o.GRPCServerAddress)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
if o.QueryRetries != 0 {
|
||||
logSection, err := getOrCreateSection("database")
|
||||
require.NoError(t, err)
|
||||
_, err = logSection.NewKey("query_retries", fmt.Sprintf("%d", o.QueryRetries))
|
||||
require.NoError(t, err)
|
||||
}
|
||||
}
|
||||
|
||||
cfgPath := filepath.Join(cfgDir, "test.ini")
|
||||
@ -345,4 +351,5 @@ type GrafanaOpts struct {
|
||||
UnifiedAlertingDisabledOrgs []int64
|
||||
EnableLog bool
|
||||
GRPCServerAddress string
|
||||
QueryRetries int64
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user