Skip to content

Commit

Permalink
Added sleep for server latency failed test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoningLiu committed Jan 3, 2019
1 parent ee973fe commit ab9bcba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 4 additions & 3 deletions blob/tests/bloburl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ describe("BlobURL", () => {
assert.equal(result.leaseState, "leased");
assert.equal(result.leaseStatus, "locked");

await sleep(16 * 1000);
await sleep(20 * 1000);

const result2 = await blobURL.getProperties(Aborter.none);
assert.ok(!result2.leaseDuration);
assert.equal(result2.leaseState, "expired");
Expand Down Expand Up @@ -187,14 +188,14 @@ describe("BlobURL", () => {
assert.equal(result.leaseState, "leased");
assert.equal(result.leaseStatus, "locked");

await blobURL.breakLease(Aborter.none, 3);
await blobURL.breakLease(Aborter.none, 5);

const result2 = await blobURL.getProperties(Aborter.none);
assert.ok(!result2.leaseDuration);
assert.equal(result2.leaseState, "breaking");
assert.equal(result2.leaseStatus, "locked");

await sleep(3 * 1000);
await sleep(5 * 1000);

const result3 = await blobURL.getProperties(Aborter.none);
assert.ok(!result3.leaseDuration);
Expand Down
3 changes: 3 additions & 0 deletions blob/tests/node/pagebloburl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ describe("PageBlobURL", () => {
);

await containerURL.setAccessPolicy(Aborter.none, "container");

await sleep(5 * 1000);

let copySource = pageBlobURL.withSnapshot(snapshotResult.snapshot!).url;
let copyResponse = await destPageBlobURL.startCopyIncremental(
Aborter.none,
Expand Down

0 comments on commit ab9bcba

Please sign in to comment.