1
0
mirror of https://github.com/go-task/task.git synced 2026-05-18 09:22:12 +02:00

test(failfast): use duration assertion instead of stdout to fix flake

This commit is contained in:
Valentin Maerten
2026-04-19 22:55:23 +02:00
parent 6e37e3d7a7
commit 0431e4bf27
7 changed files with 74 additions and 26 deletions
+12 -6
View File
@@ -1,14 +1,20 @@
version: '3'
vars:
SLEEP: ''
tasks:
default:
deps:
- dep1
- dep2
- dep3
- task: dep1
vars: { SLEEP: '{{.SLEEP}}' }
- task: dep2
vars: { SLEEP: '{{.SLEEP}}' }
- task: dep3
vars: { SLEEP: '{{.SLEEP}}' }
- dep4
dep1: sleep 0.1 && echo 'dep1'
dep2: sleep 0.2 && echo 'dep2'
dep3: sleep 0.3 && echo 'dep3'
dep1: '{{.SLEEP}}echo ''dep1'''
dep2: '{{.SLEEP}}echo ''dep2'''
dep3: '{{.SLEEP}}echo ''dep3'''
dep4: exit 1
@@ -1 +1 @@
task: Failed to run task "default": task: Failed to run task "dep4": exit status 1
task: Failed to run task "default": task: Failed to run task "dep4": exit status 1
@@ -1 +0,0 @@
+3 -3
View File
@@ -9,7 +9,7 @@ tasks:
- dep4
failfast: true
dep1: sleep 0.1 && echo 'dep1'
dep2: sleep 0.2 && echo 'dep2'
dep3: sleep 0.3 && echo 'dep3'
dep1: sleep 5 && echo 'dep1'
dep2: sleep 6 && echo 'dep2'
dep3: sleep 7 && echo 'dep3'
dep4: exit 1
@@ -1 +1 @@
task: Failed to run task "default": task: Failed to run task "dep4": exit status 1
task: Failed to run task "default": task: Failed to run task "dep4": exit status 1
@@ -1 +0,0 @@