diff --git a/lib/workers/repository/process/limits.spec.ts b/lib/workers/repository/process/limits.spec.ts index 26244f6ee8d1feca182732d508605294d49ddff9..9f0252dc5e753964d9632635439f4da3a4d34592 100644 --- a/lib/workers/repository/process/limits.spec.ts +++ b/lib/workers/repository/process/limits.spec.ts @@ -46,10 +46,10 @@ describe('workers/repository/process/limits', () => { expect(res).toBe(5); }); - it('returns 99 if no hourly limit', async () => { + it('returns MAX_SAFE_INTEGER if no hourly limit', async () => { config.prHourlyLimit = 0; const res = await limits.getPrHourlyRemaining(config); - expect(res).toBe(99); + expect(res).toBe(Number.MAX_SAFE_INTEGER); }); }); @@ -74,10 +74,10 @@ describe('workers/repository/process/limits', () => { expect(res).toBe(19); }); - it('returns 99 if no concurrent limit', async () => { + it('returns MAX_SAFE_INTEGER if no concurrent limit', async () => { config.prConcurrentLimit = 0; const res = await limits.getConcurrentPrsRemaining(config, []); - expect(res).toBe(99); + expect(res).toBe(Number.MAX_SAFE_INTEGER); }); }); @@ -120,7 +120,7 @@ describe('workers/repository/process/limits', () => { config.branchConcurrentLimit = 0; config.prConcurrentLimit = 20; const res = await limits.getConcurrentBranchesRemaining(config, []); - expect(res).toBe(99); + expect(res).toBe(Number.MAX_SAFE_INTEGER); }); it('returns 10 if no limits are set', async () => { diff --git a/lib/workers/repository/process/limits.ts b/lib/workers/repository/process/limits.ts index 24423a225f3938ee22406610f4bed1f5f084a1f5..3cfedafc23ee16533524fb6363c6bb99dd5843b1 100644 --- a/lib/workers/repository/process/limits.ts +++ b/lib/workers/repository/process/limits.ts @@ -36,7 +36,7 @@ export async function getPrHourlyRemaining( return config.prHourlyLimit; } } - return 99; + return Number.MAX_SAFE_INTEGER; } export async function getConcurrentPrsRemaining( @@ -78,7 +78,7 @@ export async function getConcurrentPrsRemaining( return config.prConcurrentLimit; } } - return 99; + return Number.MAX_SAFE_INTEGER; } export async function getPrsRemaining( @@ -124,7 +124,7 @@ export async function getConcurrentBranchesRemaining( return limit; } } - return 99; + return Number.MAX_SAFE_INTEGER; } export async function getBranchesRemaining(