mirror of
https://github.com/go-task/task.git
synced 2026-08-29 10:08:27 +02:00
feat: command timeouts (#2898)
This commit is contained in:
27
testdata/run_once_timeout/Taskfile.yml
vendored
Normal file
27
testdata/run_once_timeout/Taskfile.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
|
||||
tasks:
|
||||
default:
|
||||
# Without failfast the run waits for `owner` anyway, hiding what is tested.
|
||||
failfast: true
|
||||
deps: [owner, joiner]
|
||||
|
||||
# Holds the shared task far longer than `joiner` waits, so `joiner` reaches
|
||||
# the deduplication path while it is still running.
|
||||
owner:
|
||||
cmds:
|
||||
- task: shared
|
||||
|
||||
joiner:
|
||||
cmds:
|
||||
- sleep 0.2
|
||||
- task: shared
|
||||
timeout: 500ms
|
||||
- echo "should not be reached"
|
||||
|
||||
shared:
|
||||
run: once
|
||||
cmds:
|
||||
- sleep 10
|
||||
Reference in New Issue
Block a user