diff --git a/src/targets/__tests__/maven.test.ts b/src/targets/__tests__/maven.test.ts index 9a63071e..e1dce99a 100644 --- a/src/targets/__tests__/maven.test.ts +++ b/src/targets/__tests__/maven.test.ts @@ -808,13 +808,13 @@ describe('closeRepository', () => { Promise.resolve(getRepositoryInfo('open')) ); - // Deadline is 60min, so we fake pooling start time and initial read to 1min - // and second iteration to something over 60min + // Deadline is 2h, so we fake pooling start time and initial read to 1min + // and second iteration to something over 2h jest .spyOn(Date, 'now') .mockImplementationOnce(() => 1 * 60 * 1000) .mockImplementationOnce(() => 1 * 60 * 1000) - .mockImplementationOnce(() => 62 * 60 * 1000); + .mockImplementationOnce(() => 122 * 60 * 1000); await expect(mvnTarget.closeRepository(repositoryId)).rejects.toThrow( new Error('Deadline for Nexus repository status change reached.') @@ -915,13 +915,13 @@ describe('releaseRepository', () => { deploymentState: 'PUBLISHING' }) - // Deadline is 60min, so we fake pooling start time and initial read to 1min - // and second iteration to something over 60min + // Deadline is 2h, so we fake pooling start time and initial read to 1min + // and second iteration to something over 2h jest .spyOn(Date, 'now') .mockImplementationOnce(() => 1 * 60 * 1000) .mockImplementationOnce(() => 1 * 60 * 1000) - .mockImplementationOnce(() => 62 * 60 * 1000); + .mockImplementationOnce(() => 122 * 60 * 1000); await expect(mvnTarget.releaseRepository(repositoryId)).rejects.toThrow( new Error('Deadline for Central repository status change reached.') diff --git a/src/targets/maven.ts b/src/targets/maven.ts index fcc2355d..1c20833c 100644 --- a/src/targets/maven.ts +++ b/src/targets/maven.ts @@ -24,7 +24,7 @@ export const NEXUS_API_BASE_URL = 'https://ossrh-staging-api.central.sonatype.com'; export const CENTRAL_API_BASE_URL = 'https://central.sonatype.com/api/v1'; const NEXUS_RETRY_DELAY = 10 * 1000; // 10s -const SONATYPE_RETRY_DEADLINE = 60 * 60 * 1000; // 60min +const SONATYPE_RETRY_DEADLINE = 120 * 60 * 1000; // 2h const CENTRAL_RETRY_DELAY = 60 * 1000; // 1min export type NexusRepository = {