forked from bkinnightskytw/code_work_spawner
test: stabilize parallel event-source coverage (#37)
This commit is contained in:
parent
1790de1f08
commit
bf082115ba
|
|
@ -26,4 +26,4 @@ jobs:
|
||||||
run: dart run tool/validate_gherkin_test_format.dart
|
run: dart run tool/validate_gherkin_test_format.dart
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: dart test -j 1
|
run: dart test
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ dart run bin/code_work_spawner.dart \
|
||||||
```bash
|
```bash
|
||||||
dart run tool/validate_gherkin_test_format.dart
|
dart run tool/validate_gherkin_test_format.dart
|
||||||
dart analyze
|
dart analyze
|
||||||
dart test -j 1
|
dart test
|
||||||
```
|
```
|
||||||
|
|
||||||
## ref
|
## ref
|
||||||
|
|
|
||||||
|
|
@ -108,13 +108,13 @@ void registerIssueAssistantAppRunOnceConcurrencyTests() {
|
||||||
ghLog: ghLog,
|
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 eventLog = File(p.join(sandbox.path, 'responder-events.log'));
|
||||||
final responderScript = File(p.join(sandbox.path, 'responder-slow.sh'));
|
final responderScript = File(p.join(sandbox.path, 'responder-slow.sh'));
|
||||||
await writeDelayedLoggingResponderScript(
|
await writeDelayedLoggingResponderScript(
|
||||||
responderScript,
|
responderScript,
|
||||||
eventLog: eventLog,
|
eventLog: eventLog,
|
||||||
delay: const Duration(seconds: 1),
|
delay: const Duration(seconds: 2),
|
||||||
response: {
|
response: {
|
||||||
'decision': 'reply',
|
'decision': 'reply',
|
||||||
'mode': 'planning',
|
'mode': 'planning',
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ projects:
|
||||||
|
|
||||||
// When the long-running app starts and enough time passes for a retry.
|
// When the long-running app starts and enough time passes for a retry.
|
||||||
final runFuture = app.run();
|
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()
|
final logLines = await ghLog.exists()
|
||||||
? await ghLog.readAsLines()
|
? await ghLog.readAsLines()
|
||||||
: const <String>[];
|
: const <String>[];
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ projects:
|
||||||
|
|
||||||
// When the long-running app starts and receives the forwarded webhook.
|
// When the long-running app starts and receives the forwarded webhook.
|
||||||
final runFuture = app.run();
|
final runFuture = app.run();
|
||||||
for (var attempt = 0; attempt < 50; attempt += 1) {
|
for (var attempt = 0; attempt < 200; attempt += 1) {
|
||||||
if (await postedBody.exists()) {
|
if (await postedBody.exists()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ projects:
|
||||||
|
|
||||||
// When the long-running app starts and receives the forwarded webhook.
|
// When the long-running app starts and receives the forwarded webhook.
|
||||||
final runFuture = app.run();
|
final runFuture = app.run();
|
||||||
for (var attempt = 0; attempt < 50; attempt += 1) {
|
for (var attempt = 0; attempt < 200; attempt += 1) {
|
||||||
if (await postedBody.exists()) {
|
if (await postedBody.exists()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ projects:
|
||||||
|
|
||||||
// When the long-running app starts and receives the forwarded webhook.
|
// When the long-running app starts and receives the forwarded webhook.
|
||||||
final runFuture = app.run();
|
final runFuture = app.run();
|
||||||
for (var attempt = 0; attempt < 50; attempt += 1) {
|
for (var attempt = 0; attempt < 200; attempt += 1) {
|
||||||
if (await postedBody.exists()) {
|
if (await postedBody.exists()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -374,7 +374,7 @@ projects:
|
||||||
|
|
||||||
// When the long-running app starts and enough time passes for reconciliation polling.
|
// When the long-running app starts and enough time passes for reconciliation polling.
|
||||||
final runFuture = app.run();
|
final runFuture = app.run();
|
||||||
for (var attempt = 0; attempt < 50; attempt += 1) {
|
for (var attempt = 0; attempt < 200; attempt += 1) {
|
||||||
if (await postedBody.exists()) {
|
if (await postedBody.exists()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ projects:
|
||||||
|
|
||||||
// When the long-running app starts and receives the forwarded webhook.
|
// When the long-running app starts and receives the forwarded webhook.
|
||||||
final runFuture = app.run();
|
final runFuture = app.run();
|
||||||
for (var attempt = 0; attempt < 50; attempt += 1) {
|
for (var attempt = 0; attempt < 200; attempt += 1) {
|
||||||
if (await postedBody.exists()) {
|
if (await postedBody.exists()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -208,7 +208,7 @@ projects:
|
||||||
|
|
||||||
// When the long-running app starts and webhook-forward emits that stderr line.
|
// When the long-running app starts and webhook-forward emits that stderr line.
|
||||||
final runFuture = app.run();
|
final runFuture = app.run();
|
||||||
for (var attempt = 0; attempt < 50; attempt += 1) {
|
for (var attempt = 0; attempt < 200; attempt += 1) {
|
||||||
if (records.any(
|
if (records.any(
|
||||||
(record) => record.message.contains('error creating webhook'),
|
(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.
|
// When the long-running app starts and enough time passes for reconciliation polling.
|
||||||
final runFuture = app.run();
|
final runFuture = app.run();
|
||||||
for (var attempt = 0; attempt < 50; attempt += 1) {
|
for (var attempt = 0; attempt < 200; attempt += 1) {
|
||||||
if (await postedBody.exists()) {
|
if (await postedBody.exists()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue