Skip to content

Commit 5226513

Browse files
committed
test(deploy): increase delay between each retry
1 parent 9085f0e commit 5226513

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

packages/deploy/src/clusterChanges/applyCouchbaseClusterChanges.ts

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export async function applyCouchbaseClusterChanges(
103103
// overwhelmed in CI
104104
await retry(() => operation(cluster, apiConfig, change as never, resolvedOptions), {
105105
retries: 3,
106-
delay: 5_000,
106+
delay: 15_000,
107107
});
108108
}
109109
}
@@ -649,29 +649,15 @@ async function applyUpsertSearchIndex(
649649
.bucket(change.bucket)
650650
.scope(change.scope)
651651
.searchIndexes()
652-
.getAllIndexes();
652+
.getAllIndexes({ timeout: 15_000 });
653653

654654
const searchIndex = searchIndexes.find((s) => s.name === change.name);
655655

656656
if (searchIndex) {
657657
config.uuid = searchIndex.uuid;
658658
config.sourceUUID = searchIndex.sourceUuid;
659659
}
660-
const e = {
661-
stack: 'Error: internal_server_failure (5)',
662-
message: 'internal_server_failure (5)',
663-
ctxtype: 'http',
664-
code: 5,
665-
client_context_id: '52ad38-44b6-f84f-911f-691f4bf2826d8b',
666-
method: 'GET',
667-
path: '/api/bucket/cbjs_dc413a79/scope/bed53e57/index',
668-
http_status: 200,
669-
http_body: '{"status":"ok","indexDefs":null}\n',
670-
last_dispatched_to: '127.0.0.1:8094',
671-
last_dispatched_from: '127.0.0.1:47824',
672-
retry_attempts: +0,
673-
retry_reasons: [],
674-
};
660+
675661
console.log(
676662
`${getTimePrefix()} Requesting creation of search index "${change.bucket} # ${change.name}"`
677663
);

tests/deploy/tests/applyCouchbaseClusterChanges.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ describe.runIf(
225225
`The following changes have been detected in the cluster : \n\t${changes.map((c) => JSON.stringify(c)).join('\n\t')}`
226226
);
227227

228-
await applyCouchbaseClusterChanges(cluster, apiConfig, changes);
228+
await applyCouchbaseClusterChanges(cluster, apiConfig, changes, {
229+
timeout: 180_000,
230+
});
229231

230232
const users = await cluster.users().getAllUsers();
231233

0 commit comments

Comments
 (0)