Skip to content

Instantly share code, notes, and snippets.

@musasoftlabx
Last active July 19, 2022 06:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save musasoftlabx/ce09b2b3edaa38c8ce429c1e3e3de925 to your computer and use it in GitHub Desktop.
Save musasoftlabx/ce09b2b3edaa38c8ce429c1e3e3de925 to your computer and use it in GitHub Desktop.
const retryIntervalInSeconds = 10;
const maxTestDurationInMinutes = 1;
let int = setInterval(() =>
// Kaa unatumia env variables: pm.sendRequest(pm.variables.get('url') + 'weka/resource/hapa', (err, res) =>
pm.sendRequest('http://site.com/weka/resource/hapa', (err, res) =>
res.code === 200 ? (console.log(res), clearInterval(int)) : console.log(res.code)
), retryIntervalInSeconds * 1000);
setTimeout(() => clearInterval(int), maxTestDurationInMinutes * 60 * 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment