Skip to content

Commit

Permalink
prevent loadtest from crashing on error response (#10517)
Browse files Browse the repository at this point in the history
  • Loading branch information
soloseng authored Aug 25, 2023
1 parent 56727bf commit f6141ac
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/phone-number-privacy/monitor/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,13 @@ export async function concurrentRPSLoadTest(
}

const testFn = async () => {
await (endpoint === CombinerEndpointPNP.PNP_SIGN
? testPNPSignQuery(blockchainProvider, contextName, undefined, bypassQuota, useDEK)
: testPNPQuotaQuery(blockchainProvider, contextName))
try {
await (endpoint === CombinerEndpointPNP.PNP_SIGN
? testPNPSignQuery(blockchainProvider, contextName, undefined, bypassQuota, useDEK)
: testPNPQuotaQuery(blockchainProvider, contextName))
} catch (_) {
logger.error('load test request failed')
}
}

return doRPSTest(measureLatency(testFn), rps, duration)
Expand Down

0 comments on commit f6141ac

Please sign in to comment.