MCPcopy
hub / github.com/apache/devlake / AwaitPluginAvailability

Method AwaitPluginAvailability

backend/test/helper/client.go:217–226  ·  view source on GitHub ↗

AwaitPluginAvailability wait for this plugin to become available on the server given a timeout. Returns false if this condition does not get met.

(pluginName string, timeout time.Duration)

Source from the content-addressed store, hash-verified

215
216// AwaitPluginAvailability wait for this plugin to become available on the server given a timeout. Returns false if this condition does not get met.
217func (d *DevlakeClient) AwaitPluginAvailability(pluginName string, timeout time.Duration) {
218 if d.isRemote {
219 return
220 }
221 err := runWithTimeout(timeout, func() (bool, errors.Error) {
222 _, err := plugin.GetPlugin(pluginName)
223 return err == nil, nil
224 })
225 require.NoError(d.testCtx, err)
226}
227
228// RunPlugin manually execute a plugin directly (local server only)
229func (d *DevlakeClient) RunPlugin(ctx context.Context, pluginName string, pluginTask plugin.PluginTask, options map[string]interface{}, subtaskNames ...string) errors.Error {

Callers 1

CreateClientFunction · 0.80

Calls 2

runWithTimeoutFunction · 0.85
GetPluginMethod · 0.80

Tested by

no test coverage detected