harden PTY test timeouts (5s -> 20s)
test / unit + widget + golden + a11y (push) Failing after 27s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 24s

The real-shell PTY tests gave a child + reader-isolate only 5s to
deliver first output; under transient scheduling latency that was
occasionally exceeded, flaking the pre-push gate (retry:2 usually but
not always absorbed it). A working PTY echoes in well under a second,
so 20s is pure headroom — a genuinely dead PTY still fails, just later.
Verified 5/5 clean runs after the bump.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-23 09:48:26 +02:00
co-authored by Claude Opus 4.7
parent f65ef50379
commit 4b4d911734
+7 -7
View File
@@ -38,7 +38,7 @@ void main() {
);
addTearDown(s.close);
final got = await _readUntil(s, 'hello-pty', const Duration(seconds: 5));
final got = await _readUntil(s, 'hello-pty', const Duration(seconds: 20));
expect(got, contains('hello-pty'));
});
@@ -67,13 +67,13 @@ void main() {
addTearDown(sub.cancel);
await firstByte.future.timeout(
const Duration(seconds: 5),
onTimeout: () => fail('shell never produced its first byte within 5s'),
const Duration(seconds: 20),
onTimeout: () => fail('shell never produced its first byte within 20s'),
);
s.write(utf8.encode('echo write-test-ok\n'));
final result = await _waitForBuffer(buf, 'write-test-ok', const Duration(seconds: 5));
final result = await _waitForBuffer(buf, 'write-test-ok', const Duration(seconds: 20));
expect(result, contains('write-test-ok'));
});
@@ -95,8 +95,8 @@ void main() {
await s.close();
await done.future.timeout(
const Duration(seconds: 3),
onTimeout: () => fail('output stream did not close within 3s after s.close()'),
const Duration(seconds: 10),
onTimeout: () => fail('output stream did not close within 10s after s.close()'),
);
expect(s.isClosed, isTrue);
});
@@ -116,7 +116,7 @@ void main() {
);
addTearDown(s.close);
final got = await _readUntil(s, 'path-resolution-ok', const Duration(seconds: 5));
final got = await _readUntil(s, 'path-resolution-ok', const Duration(seconds: 20));
expect(got, contains('path-resolution-ok'));
});