mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-24 17:11:28 +01:00
The spawnSync overflow test no longer fails about once an hour on CI (GSTA-712) (#4613)
The raw-Bun overflow test in test/spawn-sync.test.ts stops failing at random on CI: its child process now writes 32 KiB instead of 200,000 bytes. Why: the old write sat 13 KB under Linux's 212,992-byte socket send buffer. When it didn't fit, the child hit a broken pipe and exited 1, so the test saw status 1 instead of 0. Trunk flagged it 22 times in one day, and every time it passed on retry. Nothing to do: this changes tests only. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
27e5db9902
commit
43c9c201e3
3 files changed
+9
-3
No files matched your search
@@ -230,7 +230,8 @@ describe('wtreeFingerprint', () => {
|
||||
describe('runScriptSync and runBashSync with output past maxBuffer (GST-3104)', () => {
|
||||
// A child that ignores SIGTERM outlives Bun's overflow kill and exits 0, so raw spawnSync would
|
||||
// report status 0 with ENOBUFS and cut-off stdout (GST-3086); these runners must report status null.
|
||||
const OVERFLOW = "process.on('SIGTERM', () => {}); process.stdout.write('x'.repeat(200000)); setTimeout(() => {}, 300);";
|
||||
// The write fits the Unix socket send buffer, so the child really exits 0 (see test/spawn-sync.test.ts).
|
||||
const OVERFLOW = "process.on('SIGTERM', () => {}); process.stdout.write('x'.repeat(32768)); setTimeout(() => {}, 300);";
|
||||
const expectIncomplete = (r: { status: number | null; error?: Error; stderr: string }) => {
|
||||
expect(r.status).toBeNull();
|
||||
expect((r.error as NodeJS.ErrnoException | undefined)?.code).toBe('ENOBUFS');
|
||||
|
||||
Reference in new issue
Block a user