diff --git a/integrationTests/cloneNode/cloneNode.test.mjs b/integrationTests/cloneNode/cloneNode.test.mjs index 7f0c80016..ebbd372e7 100644 --- a/integrationTests/cloneNode/cloneNode.test.mjs +++ b/integrationTests/cloneNode/cloneNode.test.mjs @@ -205,14 +205,25 @@ suite('Clone Node', (ctx) => { equal(clusterStatusNode2.connections.length, 1, 'Clone node should have 1 connection'); equal(clusterStatusNode2.connections?.[0]?.database_sockets.length, 2, 'Clone node should be connected to leader'); - // Verify that data was cloned successfully by querying the clone node for data that was inserted into the leader node before cloning - const responseData = await sendOperation(ctx.nodes[1], { - operation: 'search_by_id', - table: 'test', - get_attributes: ['id', 'name'], - ids: ['1'], - }); - equal(responseData.length, 1, 'Should find 1 record in clone node'); + // Verify that data was cloned successfully by querying the clone node for data that was inserted into the leader node before cloning. + // "Available" status doesn't guarantee all data has finished copying, so retry until the record appears. + let responseData; + for (let retries = 0; ; retries++) { + try { + responseData = await sendOperation(ctx.nodes[1], { + operation: 'search_by_id', + table: 'test', + get_attributes: ['id', 'name'], + ids: ['1'], + }); + if (responseData.length === 1) break; + } catch {} + if (retries >= 20) { + equal(responseData?.length ?? 0, 1, 'Should find 1 record in clone node'); + break; + } + await sleep(500); + } equal(responseData[0].name, 'test-clone', 'Record name should match the original'); const sshKeys = await sendOperation(ctx.nodes[1], { diff --git a/integrationTests/cluster/replicationLoad.test.mjs b/integrationTests/cluster/replicationLoad.test.mjs index caaccb208..51a8e59fb 100644 --- a/integrationTests/cluster/replicationLoad.test.mjs +++ b/integrationTests/cluster/replicationLoad.test.mjs @@ -19,7 +19,7 @@ process.env.HARPER_INTEGRATION_TEST_INSTALL_SCRIPT = join( ); const NODE_COUNT = 3; -suite('Replication Load Testing', { timeout: 120000 }, (ctx) => { +suite('Replication Load Testing', { timeout: 300000 }, (ctx) => { before(async () => { // start up the nodes ctx.nodes = await Promise.all( @@ -267,7 +267,7 @@ suite('Replication Load Testing', { timeout: 120000 }, (ctx) => { } } }); - suite('Deploy app and test replication', { timeout: 60000 }, () => { + suite('Deploy app and test replication', { timeout: 180000 }, () => { before(async () => { const project = 'test-application'; const payload = await targz(join(import.meta.dirname, 'fixture'));