MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / WaitForConditionShouldRetry

Method WaitForConditionShouldRetry

rest/utilities_testing.go:950–958  ·  view source on GitHub ↗
(conditionFunc func() (shouldRetry bool, err error, value interface{}), maxNumAttempts, timeToSleepMs int)

Source from the content-addressed store, hash-verified

948}
949
950func (rt *RestTester) WaitForConditionShouldRetry(conditionFunc func() (shouldRetry bool, err error, value interface{}), maxNumAttempts, timeToSleepMs int) error {
951 sleeper := base.CreateSleeperFunc(maxNumAttempts, timeToSleepMs)
952 err, _ := base.RetryLoop(rt.Context(), "Wait for condition options", conditionFunc, sleeper)
953 if err != nil {
954 return err
955 }
956
957 return nil
958}
959
960func (rt *RestTester) SendAdminRequest(method, resource, body string) *TestResponse {
961 request := Request(method, rt.mustTemplateResource(resource), body)

Callers

nothing calls this directly

Calls 3

ContextMethod · 0.95
CreateSleeperFuncFunction · 0.92
RetryLoopFunction · 0.92

Tested by

no test coverage detected