|
59 | 59 | * package — `@objectstack/cloud-connection` and `@objectstack/metadata-protocol` |
60 | 60 | * included — resolved through its `exports` to `dist/`, so an ablation of either |
61 | 61 | * package's source reaches this file only after that package is rebuilt. Every |
62 | | - * boot runs in `beforeAll`; the `it`s only read what the phases recorded. The |
63 | | - * four orders run at once, each in its own cwd and home: one order's steps |
64 | | - * run in sequence, and no order reads another's. |
| 62 | + * boot runs in `beforeAll`; the `it`s only read what the phases recorded. Each |
| 63 | + * order has its own cwd and home and runs its steps in sequence; two orders run |
| 64 | + * at a time, and no order reads another's. |
65 | 65 | */ |
66 | 66 |
|
67 | 67 | import { describe, it, expect, beforeAll, afterAll } from 'vitest'; |
@@ -352,10 +352,9 @@ beforeAll(async () => { |
352 | 352 |
|
353 | 353 | // The four orders share nothing but the two package directories they read: |
354 | 354 | // each has its own cwd, home and ledger, and every boot binds a |
355 | | - // kernel-assigned port. So they run at once, and the file waits for the |
356 | | - // longest one rather than for their sum. Inside an order every step still |
357 | | - // waits for the one before it. |
358 | | - await allPhases([ |
| 355 | + // kernel-assigned port. Inside an order every step still waits for the one |
| 356 | + // before it. |
| 357 | + const [hot, restarted, reseed, reinstall]: Array<() => Promise<void>> = [ |
359 | 358 | // ── order 1: hot install → DELETE → restart ──────────────────────────── |
360 | 359 | async () => { |
361 | 360 | const hotDir = join(root, 'hot'); |
@@ -427,6 +426,14 @@ beforeAll(async () => { |
427 | 426 | }; |
428 | 427 | await stopGroup(h.child); |
429 | 428 | }, |
| 429 | + ]; |
| 430 | + // Two orders at a time, paired so each pair is four boots and three installs. |
| 431 | + // ⛔ Not all four at once: every live `os start` holds well over a gigabyte, |
| 432 | + // and four of them beside the package's other workers ran a 15 GB box out of |
| 433 | + // memory (exit 137, SIGKILL). |
| 434 | + await allPhases([ |
| 435 | + async () => { await hot(); await reseed(); }, |
| 436 | + async () => { await restarted(); await reinstall(); }, |
430 | 437 | ]); |
431 | 438 | }, 9 * BOOT_TIMEOUT_MS); |
432 | 439 |
|
|
0 commit comments