You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The elasticsearch module should support the client applying a custom StartupTimeout.
In resource constrained environments as seen in some (many?) Github Actions it can take longer for the container to complete the WaitFor strategy. By allowing the client to specify the timeout they can control how long their system is willing to wait.
This module currently does support the client passing in additional strategies. However, the StartupTimeout needs to be applied to the wait.ForHTTP strategy.
The logs as seen from a timeout include the following where it can be seen that no timeout is applied to the wait.ForHTTP("/"):
This module could be updated to include an additional option:
// WithStartupTimeout sets the timeout duration used when waiting for the Elasticsearch container to start.funcWithStartupTimeout(timeout time.Duration) Option {
returnfunc(o*Options) {
o.StartupTimeout=timeout
}
}
and then apply the option in the setWaitFor function. Here I have setup no default StartupTimeout, but one could be applied to the defaultOptions, and then skip the if condition here:
Proposal
The elasticsearch module should support the client applying a custom StartupTimeout.
In resource constrained environments as seen in some (many?) Github Actions it can take longer for the container to complete the WaitFor strategy. By allowing the client to specify the timeout they can control how long their system is willing to wait.
This module currently does support the client passing in additional strategies. However, the StartupTimeout needs to be applied to the
wait.ForHTTP
strategy.The logs as seen from a timeout include the following where it can be seen that no timeout is applied to the
wait.ForHTTP("/")
:This module could be updated to include an additional option:
and then apply the option in the setWaitFor function. Here I have setup no default StartupTimeout, but one could be applied to the defaultOptions, and then skip the
if
condition here:The text was updated successfully, but these errors were encountered: