Stabilize Playwright phase 8 E2E to 25 green specs.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Harden login and online-card assertions, fix multi-hop discover spread selection, add Path Tracer RS lanes mock E2E, and graceful stub WS teardown.
This commit is contained in:
@@ -44,7 +44,9 @@ export const E2E_DISCOVER_AGENT_HOSTNAME = E2E_DISCOVER_CHAIN_HOPS[0].hostname;
|
||||
export const E2E_DISCOVER_JOIN_LANE = E2E_DISCOVER_CHAIN_HOPS[0].joinLane;
|
||||
export const E2E_DISCOVER_JOIN_LABEL = E2E_DISCOVER_CHAIN_HOPS[0].joinLabel;
|
||||
|
||||
const baseURL = process.env.AETHERFORGE_URL || 'http://127.0.0.1:8989';
|
||||
function e2eBaseURL(): string {
|
||||
return process.env.AETHERFORGE_URL || 'http://127.0.0.1:8989';
|
||||
}
|
||||
const STATS_INTERVAL_MS = 1_000;
|
||||
|
||||
type HubMessage = {
|
||||
@@ -217,7 +219,9 @@ async function connectDiscoverSpreadHop(
|
||||
return () => {
|
||||
hopConnections.delete(hop.id);
|
||||
clearInterval(statsTimer);
|
||||
ws.close();
|
||||
if (ws.readyState === WebSocket.OPEN || ws.readyState === WebSocket.CONNECTING) {
|
||||
ws.close(1000, 'e2e-teardown');
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -233,11 +237,13 @@ export async function ensureDiscoverSpreadStub(request: APIRequestContext): Prom
|
||||
if (!serverReady) return false;
|
||||
|
||||
const fleetSecret = await fetchFleetSecret(request);
|
||||
const baseURL = e2eBaseURL();
|
||||
for (const hop of E2E_DISCOVER_CHAIN_HOPS) {
|
||||
const disconnect = await connectDiscoverSpreadHop(baseURL, fleetSecret, hop);
|
||||
disconnectStubs.push(disconnect);
|
||||
}
|
||||
await new Promise((r) => setTimeout(r, 3_000));
|
||||
// Allow agent_online, stats_batch (250ms coalesce), and DB upsert to settle.
|
||||
await new Promise((r) => setTimeout(r, 4_000));
|
||||
return true;
|
||||
})();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user