MCPcopy Create free account
hub / github.com/coder/coder / attach

Method attach

cli/exp_scaletest.go:188–213  ·  view source on GitHub ↗
(opts *serpent.OptionSet)

Source from the content-addressed store, hash-verified

186}
187
188func (t *timeoutFlags) attach(opts *serpent.OptionSet) {
189 timeoutLong, timeoutEnv, timeoutDescription := "timeout", "CODER_SCALETEST_TIMEOUT", "Timeout for the entire test run. 0 means unlimited."
190 jobTimeoutLong, jobTimeoutEnv, jobTimeoutDescription := "job-timeout", "CODER_SCALETEST_JOB_TIMEOUT", "Timeout per job. Jobs may take longer to complete under higher concurrency limits."
191 if t.cleanup {
192 timeoutLong, timeoutEnv, timeoutDescription = "cleanup-"+timeoutLong, "CODER_SCALETEST_CLEANUP_TIMEOUT", strings.ReplaceAll(timeoutDescription, "test", "cleanup")
193 jobTimeoutLong, jobTimeoutEnv, jobTimeoutDescription = "cleanup-"+jobTimeoutLong, "CODER_SCALETEST_CLEANUP_JOB_TIMEOUT", strings.ReplaceAll(jobTimeoutDescription, "jobs", "cleanup jobs")
194 }
195
196 *opts = append(
197 *opts,
198 serpent.Option{
199 Flag: timeoutLong,
200 Env: timeoutEnv,
201 Description: timeoutDescription,
202 Default: "30m",
203 Value: serpent.DurationOf(&t.timeout),
204 },
205 serpent.Option{
206 Flag: jobTimeoutLong,
207 Env: jobTimeoutEnv,
208 Description: jobTimeoutDescription,
209 Default: "5m",
210 Value: serpent.DurationOf(&t.timeoutPerJob),
211 },
212 )
213}
214
215func (t *timeoutFlags) wrapStrategy(strategy harness.ExecutionStrategy) harness.ExecutionStrategy {
216 if t.timeoutPerJob > 0 {

Callers 14

scaletestChatMethod · 0.45
scaletestTaskStatusMethod · 0.45
scaletestBridgeMethod · 0.45
scaletestPrebuildsMethod · 0.45
attachMethod · 0.45
scaletestCleanupMethod · 0.45
scaletestDashboardMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected