Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions integrationTests/cloneNode/cloneNode.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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], {
Expand Down
4 changes: 2 additions & 2 deletions integrationTests/cluster/replicationLoad.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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'));
Expand Down
Loading