diff --git a/test/src/e2e.long/sync2.test.ts b/test/src/e2e.long/sync2.test.ts index f63f821e25..93e8ae0834 100644 --- a/test/src/e2e.long/sync2.test.ts +++ b/test/src/e2e.long/sync2.test.ts @@ -25,8 +25,10 @@ describe("sync 2 nodes", function() { describe("2 nodes", function() { beforeEach(async function() { - nodeA = new CodeChain(); - nodeB = new CodeChain(); + // To generate a block this test sends a tx to a node. + // If the tx is propagated before generating a block, tests in this file would fail. + nodeA = new CodeChain({ argv: ["--no-tx-relay"] }); + nodeB = new CodeChain({ argv: ["--no-tx-relay"] }); await Promise.all([nodeA.start(), nodeB.start()]); }); diff --git a/test/src/e2e.long/sync3.test.ts b/test/src/e2e.long/sync3.test.ts index ab724ad702..12ac312a89 100644 --- a/test/src/e2e.long/sync3.test.ts +++ b/test/src/e2e.long/sync3.test.ts @@ -28,7 +28,9 @@ describe("sync 3 nodes", function() { nodes = []; for (let i = 0; i < NUM_NODES; i++) { const node = new CodeChain({ - argv: ["--no-discovery"] + // To generate a block this test sends a tx to a node. + // If the tx is propagated before generating a block, tests in this file would fail. + argv: ["--no-discovery", "--no-tx-relay"] }); nodes.push(node); } diff --git a/test/src/e2e.long/sync5.test.ts b/test/src/e2e.long/sync5.test.ts index 32f02aa903..b905925372 100644 --- a/test/src/e2e.long/sync5.test.ts +++ b/test/src/e2e.long/sync5.test.ts @@ -27,8 +27,10 @@ describe("sync 5 nodes", function() { nodes = []; for (let i = 0; i < NUM_NODES; i++) { + // To generate a block this test sends a tx to a node. + // If the tx is propagated before generating a block, tests in this file would fail. const node = new CodeChain({ - argv: ["--no-discovery"] + argv: ["--no-discovery", "--no-tx-relay"] }); nodes.push(node); }