Atlas › Test

TestConfig_OverrideAttemptTimeout

Exact test identity: go.temporal.io/server/common/testing/await/TestConfig_OverrideAttemptTimeout

Package
go.temporal.io/server/common/testing/await
Suite / test hierarchy
TestConfig_OverrideAttemptTimeout
Test
TestConfig_OverrideAttemptTimeout
Introduced at
config.go ×2 Frontier kind: Joint frontier
Covered ranges
2
Covered lines
10
Covered files
1

Covered source

Expand a file to inspect source; the > gutter marks covered lines.

go.temporal.io/server/common/testing/await/config.go 10 covered LOC · 2 ranges

Open complete file

17 }
18
19 > func newConfig() config { config.go
20 > return config{
21 > attemptTimeout: envDuration(attemptTimeoutEnvVar, 10*time.Second) * debug.TimeoutMultiplier,
22 > }
23 > }
24
25 func legacyConfig(timeout, pollInterval time.Duration, timeoutMsg string) config {
31 }
32
33 > func envDuration(name string, fallback time.Duration) time.Duration { config.go
34 > if s := os.Getenv(name); s != "" {
35 > if d, err := time.ParseDuration(s); err == nil && d > 0 {
36 > return d
37 > }
38 }
39 return fallback