@sudobility/testomniac_runner 0.0.173 → 0.0.175
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/runner/worker-pool.ts +3 -1
- package/src/runner-manager.ts +20 -1
package/package.json
CHANGED
|
@@ -80,8 +80,10 @@ export async function runTestJobs(
|
|
|
80
80
|
durationMs: result.durationMs,
|
|
81
81
|
errorMessage: result.error,
|
|
82
82
|
});
|
|
83
|
-
await api.
|
|
83
|
+
await api.scanEnd({
|
|
84
|
+
testRunId: testRun.id,
|
|
84
85
|
status: result.passed ? "completed" : "failed",
|
|
86
|
+
runDetection: false,
|
|
85
87
|
});
|
|
86
88
|
|
|
87
89
|
results.push({
|
package/src/runner-manager.ts
CHANGED
|
@@ -112,7 +112,14 @@ export class RunnerManager {
|
|
|
112
112
|
"runner not found for pending run"
|
|
113
113
|
);
|
|
114
114
|
try {
|
|
115
|
-
|
|
115
|
+
// Use /scan/end for closeout (not the legacy completeTestRun). The
|
|
116
|
+
// run was never claimed/started, so there is no bundle work to
|
|
117
|
+
// cancel — just mark the test run failed.
|
|
118
|
+
await api.scanEnd({
|
|
119
|
+
testRunId: pendingRun.id,
|
|
120
|
+
status: "failed",
|
|
121
|
+
runDetection: false,
|
|
122
|
+
});
|
|
116
123
|
} catch (err) {
|
|
117
124
|
logger.error(
|
|
118
125
|
{ err, runId: pendingRun.id },
|
|
@@ -226,8 +233,20 @@ export class RunnerManager {
|
|
|
226
233
|
// clobber the server-side closeout. This stays purely as a backstop for
|
|
227
234
|
// the rare case the inner service threw before owning closeout.
|
|
228
235
|
try {
|
|
236
|
+
// Best-effort: resolve the bundle run so the backstop closeout can also
|
|
237
|
+
// cancel pending interaction runs and close surface/bundle runs — not
|
|
238
|
+
// just the test_run. Falls back to test-run-only closeout if the lookup
|
|
239
|
+
// fails (still better than leaving it open).
|
|
240
|
+
let bundleRunId: number | undefined;
|
|
241
|
+
try {
|
|
242
|
+
const testRun = await api.getTestRun(params.runId);
|
|
243
|
+
bundleRunId = testRun?.testSurfaceBundleRunId ?? undefined;
|
|
244
|
+
} catch {
|
|
245
|
+
// ignore — fall back to test-run-only closeout
|
|
246
|
+
}
|
|
229
247
|
await api.scanEnd({
|
|
230
248
|
testRunId: params.runId,
|
|
249
|
+
bundleRunId,
|
|
231
250
|
status: "failed",
|
|
232
251
|
runDetection: false,
|
|
233
252
|
});
|