(t *testing.T)
| 143 | } |
| 144 | |
| 145 | func concurrentTestDuration(t *testing.T) time.Duration { |
| 146 | durationInEnv := strings.ToLower(os.Getenv(testConcurrentCaseDuration)) |
| 147 | if durationInEnv == "" { |
| 148 | t.Logf("%q not set, defaults to %s", testConcurrentCaseDuration, defaultConcurrentTestDuration) |
| 149 | return defaultConcurrentTestDuration |
| 150 | } |
| 151 | |
| 152 | d, err := time.ParseDuration(durationInEnv) |
| 153 | if err != nil { |
| 154 | t.Logf("Failed to parse %s=%s, error: %v, defaults to %s", testConcurrentCaseDuration, durationInEnv, err, defaultConcurrentTestDuration) |
| 155 | return defaultConcurrentTestDuration |
| 156 | } |
| 157 | |
| 158 | t.Logf("Concurrent test duration set by %s=%s", testConcurrentCaseDuration, d) |
| 159 | return d |
| 160 | } |
| 161 | |
| 162 | func concurrentReadAndWrite(t *testing.T, |
| 163 | workerCount int, |
no outgoing calls
no test coverage detected