Skip to content

Commit e105318

Browse files
branchseerclaude
andcommitted
test(e2e): add --parallel flag execution test
Package b depends on a, so without --parallel they run sequentially. Both use a barrier requiring 2 participants — completing without timeout proves --parallel discards edges and runs them concurrently. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e9f8d0f commit e105318

File tree

7 files changed

+43
-0
lines changed

7 files changed

+43
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "parallel-execution-test",
3+
"private": true
4+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "@parallel/a",
3+
"scripts": {
4+
"build": "vtt barrier ../../.barrier sync 2"
5+
}
6+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "@parallel/b",
3+
"scripts": {
4+
"build": "vtt barrier ../../.barrier sync 2"
5+
},
6+
"dependencies": {
7+
"@parallel/a": "workspace:*"
8+
}
9+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
packages:
2+
- packages/*
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Package b depends on a, so without --parallel they run sequentially.
2+
# Both use a barrier requiring 2 participants — if run sequentially the
3+
# first would wait forever and the test would timeout.
4+
# --parallel discards dependency edges, allowing both to run at once.
5+
6+
[[e2e]]
7+
name = "parallel flag runs dependent tasks concurrently"
8+
steps = [["vt", "run", "-r", "--parallel", "build"]]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
3+
expression: e2e_outputs
4+
---
5+
> vt run -r --parallel build
6+
~/packages/a$ vtt barrier ../../.barrier sync 2cache disabled
7+
~/packages/b$ vtt barrier ../../.barrier sync 2cache disabled
8+
9+
10+
---
11+
vt run: 0/2 cache hit (0%). (Run `vt run --last-details` for full details)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cache": false
3+
}

0 commit comments

Comments
 (0)