Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion asset/snippets/test/asset.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,20 @@ describe('asset sample tests', () => {

it('should list assets successfully', async () => {
const assetType = 'storage.googleapis.com/Bucket';
const stdout = execSync(`node listAssets ${assetType} 'RESOURCE'`);
let waitMs = 2000;
let stdout = '';
for (let retry = 0; retry < 3; retry++) {
try {
await sleep(waitMs);
stdout = execSync(`node listAssets ${assetType} 'RESOURCE'`);
break;
} catch (err) {
if (retry === 2) {
throw err;
}
}
waitMs *= 2;
}
assert.include(stdout, assetType);
});

Expand Down
Loading