Skip to content

Commit

Permalink
test: handle a couple more flaky tests (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe authored Apr 3, 2020
1 parent 9c29765 commit b1d576f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const {describe, it} = require('mocha');
const cp = require('child_process');

const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
// A helper for delaying integration tests with an exponential backoff.
// See examples like: https://github.com/googleapis/nodejs-monitoring/issues/190,
// https://github.com/googleapis/nodejs-monitoring/issues/191.
// Tests in this suite can trigger the upstream error,
// "points were written more frequently than the maximum
// sampling period configured for the metric":
const delay = async test => {
const retries = test.currentRetry();
if (retries === 0) return; // no retry on the first failure.
Expand Down

0 comments on commit b1d576f

Please sign in to comment.