test: stabilize parallel event-source coverage (#37)

This commit is contained in:
insleker 2026-04-10 11:21:35 +08:00
parent 1790de1f08
commit bf082115ba
8 changed files with 12 additions and 12 deletions

View File

@ -26,4 +26,4 @@ jobs:
run: dart run tool/validate_gherkin_test_format.dart
- name: Run tests
run: dart test -j 1
run: dart test

View File

@ -82,7 +82,7 @@ dart run bin/code_work_spawner.dart \
```bash
dart run tool/validate_gherkin_test_format.dart
dart analyze
dart test -j 1
dart test
```
## ref

View File

@ -108,13 +108,13 @@ void registerIssueAssistantAppRunOnceConcurrencyTests() {
ghLog: ghLog,
);
// And a responder that sleeps for one second while logging each issue number.
// And a responder that sleeps long enough to expose overlap despite scheduler jitter.
final eventLog = File(p.join(sandbox.path, 'responder-events.log'));
final responderScript = File(p.join(sandbox.path, 'responder-slow.sh'));
await writeDelayedLoggingResponderScript(
responderScript,
eventLog: eventLog,
delay: const Duration(seconds: 1),
delay: const Duration(seconds: 2),
response: {
'decision': 'reply',
'mode': 'planning',

View File

@ -92,7 +92,7 @@ projects:
// When the long-running app starts and enough time passes for a retry.
final runFuture = app.run();
for (var attempt = 0; attempt < 60; attempt += 1) {
for (var attempt = 0; attempt < 200; attempt += 1) {
final logLines = await ghLog.exists()
? await ghLog.readAsLines()
: const <String>[];

View File

@ -123,7 +123,7 @@ projects:
// When the long-running app starts and receives the forwarded webhook.
final runFuture = app.run();
for (var attempt = 0; attempt < 50; attempt += 1) {
for (var attempt = 0; attempt < 200; attempt += 1) {
if (await postedBody.exists()) {
break;
}

View File

@ -137,7 +137,7 @@ projects:
// When the long-running app starts and receives the forwarded webhook.
final runFuture = app.run();
for (var attempt = 0; attempt < 50; attempt += 1) {
for (var attempt = 0; attempt < 200; attempt += 1) {
if (await postedBody.exists()) {
break;
}

View File

@ -165,7 +165,7 @@ projects:
// When the long-running app starts and receives the forwarded webhook.
final runFuture = app.run();
for (var attempt = 0; attempt < 50; attempt += 1) {
for (var attempt = 0; attempt < 200; attempt += 1) {
if (await postedBody.exists()) {
break;
}
@ -374,7 +374,7 @@ projects:
// When the long-running app starts and enough time passes for reconciliation polling.
final runFuture = app.run();
for (var attempt = 0; attempt < 50; attempt += 1) {
for (var attempt = 0; attempt < 200; attempt += 1) {
if (await postedBody.exists()) {
break;
}

View File

@ -103,7 +103,7 @@ projects:
// When the long-running app starts and receives the forwarded webhook.
final runFuture = app.run();
for (var attempt = 0; attempt < 50; attempt += 1) {
for (var attempt = 0; attempt < 200; attempt += 1) {
if (await postedBody.exists()) {
break;
}
@ -208,7 +208,7 @@ projects:
// When the long-running app starts and webhook-forward emits that stderr line.
final runFuture = app.run();
for (var attempt = 0; attempt < 50; attempt += 1) {
for (var attempt = 0; attempt < 200; attempt += 1) {
if (records.any(
(record) => record.message.contains('error creating webhook'),
)) {
@ -384,7 +384,7 @@ projects:
// When the long-running app starts and enough time passes for reconciliation polling.
final runFuture = app.run();
for (var attempt = 0; attempt < 50; attempt += 1) {
for (var attempt = 0; attempt < 200; attempt += 1) {
if (await postedBody.exists()) {
break;
}