MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / EventuallyExecQueryInInstancePod

Function EventuallyExecQueryInInstancePod

tests/utils/exec/exec.go:137–159  ·  view source on GitHub ↗

EventuallyExecQueryInInstancePod wraps QueryInInstancePod with an Eventually clause

(
	ctx context.Context,
	crudClient client.Client,
	kubeInterface kubernetes.Interface,
	restConfig *rest.Config,
	podLocator PodLocator,
	dbname DatabaseName,
	query string,
	retryTimeout int,
	pollingTime int,
)

Source from the content-addressed store, hash-verified

135
136// EventuallyExecQueryInInstancePod wraps QueryInInstancePod with an Eventually clause
137func EventuallyExecQueryInInstancePod(
138 ctx context.Context,
139 crudClient client.Client,
140 kubeInterface kubernetes.Interface,
141 restConfig *rest.Config,
142 podLocator PodLocator,
143 dbname DatabaseName,
144 query string,
145 retryTimeout int,
146 pollingTime int,
147) (string, string, error) {
148 var stdOut, stdErr string
149 var err error
150
151 Eventually(func() error {
152 stdOut, stdErr, err = QueryInInstancePod(
153 ctx, crudClient, kubeInterface, restConfig,
154 podLocator, dbname, query)
155 return err
156 }, retryTimeout, pollingTime).Should(Succeed())
157
158 return stdOut, stdErr, err
159}
160
161// Command wraps the utils.ExecCommand pre-setting values constant during
162// tests

Calls 1

QueryInInstancePodFunction · 0.85

Tested by

no test coverage detected