diff --git a/ci3/parallelize_strict b/ci3/parallelize_strict index 95e244490fa4..7683638abd8f 100755 --- a/ci3/parallelize_strict +++ b/ci3/parallelize_strict @@ -75,13 +75,18 @@ num_jobs=0 # We'll handle errors explicitly. set +e -run_tests | tee $output +set -o pipefail +run_tests | tee "$output" +run_exit=$? # Loop to monitor jobs until one fails or all finish. while (( $(jobs -p | wc -l) > 0 )); do wait_for_job done +# Propagate failure from run_tests (which runs in a subshell due to the pipe). +[ $run_exit -ne 0 ] && exit $run_exit + function filter_long_times { grep -E '\([0-9]+s\)$' | # Match lines ending with (number)s sed 's/.*(\([0-9]\+\)s)$/\1 &/' | # Extract number and keep original line diff --git a/yarn-project/p2p/src/client/test/tx_proposal_collector/proposal_tx_collector_worker.ts b/yarn-project/p2p/src/client/test/tx_proposal_collector/proposal_tx_collector_worker.ts index 44ad0f6eccc1..c756de610980 100644 --- a/yarn-project/p2p/src/client/test/tx_proposal_collector/proposal_tx_collector_worker.ts +++ b/yarn-project/p2p/src/client/test/tx_proposal_collector/proposal_tx_collector_worker.ts @@ -1,5 +1,4 @@ import { MockL2BlockSource } from '@aztec/archiver/test'; -import type { EpochCache } from '@aztec/epoch-cache'; import { SecretValue } from '@aztec/foundation/config'; import { createLogger } from '@aztec/foundation/log'; import { sleep } from '@aztec/foundation/sleep'; @@ -15,7 +14,6 @@ import { type TelemetryClient, getTelemetryClient } from '@aztec/telemetry-clien import type { PeerId } from '@libp2p/interface'; import { peerIdFromString } from '@libp2p/peer-id'; -import { mock } from 'jest-mock-extended'; import type { P2PConfig } from '../../../config.js'; import { BatchTxRequesterCollector, SendBatchRequestCollector } from '../../../services/index.js'; @@ -29,6 +27,7 @@ import { InMemoryTxPool, UNLIMITED_RATE_LIMIT_QUOTA, calculateInternalTimeout, + createMockEpochCache, createMockWorldStateSynchronizer, } from '../../../test-helpers/index.js'; import { createP2PClient } from '../../index.js'; @@ -99,7 +98,7 @@ function sendMessage(message: WorkerResponse): Promise { async function startClient(config: P2PConfig, clientIndex: number) { txPool = new InMemoryTxPool(); attestationPool = new InMemoryAttestationPool(); - const epochCache = mock(); + const epochCache = createMockEpochCache(); const worldState = createMockWorldStateSynchronizer(); const l2BlockSource = new MockL2BlockSource(); const proofVerifier = new AlwaysTrueCircuitVerifier(); diff --git a/yarn-project/p2p/src/testbench/p2p_client_testbench_worker.ts b/yarn-project/p2p/src/testbench/p2p_client_testbench_worker.ts index 14d733793413..1d3224d94a33 100644 --- a/yarn-project/p2p/src/testbench/p2p_client_testbench_worker.ts +++ b/yarn-project/p2p/src/testbench/p2p_client_testbench_worker.ts @@ -4,7 +4,7 @@ * Used when running testbench commands. */ import { MockL2BlockSource } from '@aztec/archiver/test'; -import type { EpochCache, EpochCacheInterface } from '@aztec/epoch-cache'; +import type { EpochCacheInterface } from '@aztec/epoch-cache'; import { BlockNumber } from '@aztec/foundation/branded-types'; import { SecretValue } from '@aztec/foundation/config'; import { Secp256k1Signer } from '@aztec/foundation/crypto/secp256k1-signer'; @@ -28,7 +28,6 @@ import { type TelemetryClient, getTelemetryClient } from '@aztec/telemetry-clien import type { Message, PeerId } from '@libp2p/interface'; import { TopicValidatorResult } from '@libp2p/interface'; import { peerIdFromString } from '@libp2p/peer-id'; -import { mock } from 'jest-mock-extended'; import type { P2PClient } from '../client/index.js'; import type { P2PConfig } from '../config.js'; @@ -50,6 +49,7 @@ import { InMemoryAttestationPool, InMemoryTxPool, UNLIMITED_RATE_LIMIT_QUOTA, + createMockEpochCache, createMockWorldStateSynchronizer, filterTxsByDistribution, } from '../test-helpers/index.js'; @@ -344,7 +344,7 @@ process.on('message', async msg => { workerConfig = config; workerTxPool = new InMemoryTxPool(); workerAttestationPool = new InMemoryAttestationPool(); - const epochCache = mock(); + const epochCache = createMockEpochCache(); const worldState = createMockWorldStateSynchronizer(); const l2BlockSource = new MockL2BlockSource();