@@ -12,27 +12,28 @@ import { setParallelCanAssign } from '@cucumber/cucumber'
12
12
setParallelCanAssign ((pickleInQuestion , picklesInProgress ) => _ .isEmpty (pickleInQuestion .tags )
13
13
|| _ .every (picklesInProgress , ({tags }) => _ .isEmpty (tags ) || tags [0 ].name !== picklesInProgress .tags [0 ].name ))
14
14
```
15
- Using the handler above and these assumptions:
16
- * Utilizing 2 workers, ` A ` and ` B `
17
- * Scenarios tagged as ` @simple ` (2 secs) or ` @complex ` (3 secs)
18
- * Tests : ` [@complex, @complex, @complex, @simple, @simple, @simple] `
15
+ * Example using the handler above
16
+ * 2 workers, ` A ` and ` B `
17
+ * Scenarios tagged as ` @simple ` (2 secs) or ` @complex ` (3 secs)
18
+ * The first tag of the scenarios : ` [@complex, @complex, @complex, @simple, @simple, @simple] `
19
19
20
20
| Time | WIP | Events |
21
21
| ---| ---| ---|
22
22
| 0 | | assigned ` 1 (@complex) ` to ` worker A ` |
23
23
| 0 | ` @complex ` | skip ` 2 & 3 (@complex) ` - assign ` 4 (@simple) ` to ` worker B ` |
24
- | 2 | ` @complex ` | skip ` 2 & 3 (@complex) ` - assign ` 5 (@simple) ` to ` worker B ` |
24
+ | 2 | ` @complex ` | skip ` 2 & 3 (@complex) ` - assign ` 5 (@simple) ` to ` worker B ` |
25
25
| 3 | ` @simple ` | assign ` 2 (@complex) ` to ` worker A ` |
26
26
| 4 | ` @complex ` | skip ` 3 (@complex) ` - assign ` 6 (@simple) ` to ` worker B ` |
27
27
| 6 | | assign ` 3 (@complex) ` to ` worker A ` |
28
28
| 9 | | done |
29
29
30
- ####Note
30
+
31
+ #### Note
31
32
The coordinator doesn't reorder work as it skips un-assignable tests. Also, it always
32
33
returns to the beginning of the unprocessed list when attempting to make assignments
33
- to an idle worker. Though assignment to worker 1 may skip the first 3 tests,
34
- assignment to worker 2 will check 1, 2, and 3 as well to determine if they have
35
- become assignable.
34
+ to an idle worker. If there was a worker C in the example above, assignment to worker B
35
+ would skip 2 & 3 as shown; then assignment to worker C would also skip 2 & 3 upon
36
+ checking the test cases against the handler to determine if they have become assignable.
36
37
37
38
Custom work assignment prioritizes your definition of assignable work over efficiency.
38
39
The exception to this rule is if all remaining work is un-assignable, such that all
0 commit comments