MCPcopy Create free account
hub / github.com/coder/envbuilder / testReplaceTimeout

Function testReplaceTimeout

log/coder_internal_test.go:341–349  ·  view source on GitHub ↗
(t *testing.T, v *time.Duration, d time.Duration)

Source from the content-addressed store, hash-verified

339}
340
341func testReplaceTimeout(t *testing.T, v *time.Duration, d time.Duration) {
342 t.Helper()
343 if isParallel(t) {
344 t.Fatal("cannot replace timeout in parallel test")
345 }
346 old := *v
347 *v = d
348 t.Cleanup(func() { *v = old })
349}
350
351func isParallel(t *testing.T) (ret bool) {
352 t.Helper()

Callers 1

TestCoderRPCTimeoutFunction · 0.85

Calls 1

isParallelFunction · 0.85

Tested by

no test coverage detected