Skip to content

Commit

Permalink
add retries to failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelgrosso1 committed Feb 29, 2024
1 parent 69a9d51 commit bccecd1
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions system-test/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ nock('http://metadata.google.internal')
.replyWithError({code: 'ENOTFOUND'})
.persist();

describe('storage', () => {
// eslint-disable-next-line prefer-arrow-callback
describe('storage', function () {
this.retries(3);

const USER_ACCOUNT = 'user-spsawchuk@gmail.com';
const TESTS_PREFIX = `storage-tests-${shortUUID()}-`;
const RETENTION_DURATION_SECONDS = 10;
Expand Down Expand Up @@ -110,23 +113,18 @@ describe('storage', () => {
},
};

before(() => {
return bucket
.create()
.then(() => {
return pubsub.createTopic(generateName());
})
.then(data => {
topic = data[0];
return topic.iam.setPolicy({
bindings: [
{
role: 'roles/pubsub.editor',
members: ['allUsers'],
},
],
});
});
before(async () => {
await bucket.create();
const data = await pubsub.createTopic(generateName());
topic = data[0];
await topic.iam.setPolicy({
bindings: [
{
role: 'roles/pubsub.editor',
members: ['allUsers'],
},
],
});
});

after(() => {
Expand Down

0 comments on commit bccecd1

Please sign in to comment.