File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ const (
2424 defaultParrotImage = "kalverra/parrot"
2525 defaultParrotVersion = "v0.6.2"
2626 defaultParrotPort = "80"
27+ defaultStartupTimeout = 10 * time .Second
2728)
2829
2930// Parrot is a test environment component that wraps a Parrot server.
@@ -56,14 +57,18 @@ func NewParrot(networks []string, opts ...EnvComponentOption) *Parrot {
5657 EnvComponent : EnvComponent {
5758 ContainerName : fmt .Sprintf ("%s-%s" , "parrot" , uuid .NewString ()[0 :3 ]),
5859 Networks : networks ,
59- StartupTimeout : 10 * time .Second ,
6060 },
6161 l : log .Logger ,
6262 }
6363 p .SetDefaultHooks ()
6464 for _ , opt := range opts {
6565 opt (& p .EnvComponent )
6666 }
67+
68+ if p .StartupTimeout == 0 {
69+ p .StartupTimeout = defaultStartupTimeout
70+ }
71+
6772 return p
6873}
6974
You can’t perform that action at this time.
0 commit comments