From 2c653f27adefd243e2364d036091cde02992c254 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Tue, 30 Jun 2020 21:53:02 +0800 Subject: [PATCH] fix test record --- .../recording_set_expiry__absolute.json | 96 ++++----- .../recording_set_expiry__absolute.js | 188 ++++++++---------- .../test/pathclient.spec.ts | 8 +- 3 files changed, 139 insertions(+), 153 deletions(-) diff --git a/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__absolute.json b/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__absolute.json index 65d4f909e2da..0635cb65463c 100644 --- a/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__absolute.json +++ b/sdk/storage/storage-file-datalake/recordings/browsers/datalakepathclient/recording_set_expiry__absolute.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159239957549208271", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159352498324300178", "query": { "restype": "container" }, @@ -11,18 +11,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Wed, 17 Jun 2020 13:12:55 GMT", - "etag": "\"0x8D812C02659726A\"", - "last-modified": "Wed, 17 Jun 2020 13:12:55 GMT", + "date": "Tue, 30 Jun 2020 13:49:43 GMT", + "etag": "\"0x8D81CFC71F20962\"", + "last-modified": "Tue, 30 Jun 2020 13:49:44 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "d113ba6d-389a-4183-93a9-b524be8c9ddd", - "x-ms-request-id": "6ba7aa3f-e01e-0029-46a9-441bdd000000", + "x-ms-client-request-id": "b0232c97-ad4f-4fb1-97b3-42cd96e37b0d", + "x-ms-request-id": "86fbebe0-e01e-0016-5ce5-4ed37e000000", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159239957549208271/file159239957607304880", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159352498324300178/file159352498487800651", "query": { "resource": "file" }, @@ -31,18 +31,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Wed, 17 Jun 2020 13:12:55 GMT", - "etag": "\"0x8D812C026B2FFFF\"", - "last-modified": "Wed, 17 Jun 2020 13:12:56 GMT", + "date": "Tue, 30 Jun 2020 13:49:45 GMT", + "etag": "\"0x8D81CFC72E7C74C\"", + "last-modified": "Tue, 30 Jun 2020 13:49:45 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "b08de4a7-8bd2-448f-99e7-208ce3fd9781", - "x-ms-request-id": "f3d5a328-101f-0002-31a9-449b11000000", + "x-ms-client-request-id": "9b74d411-8793-416a-83e8-9f69c72277b8", + "x-ms-request-id": "abbf6b9b-001f-000e-2fe5-4e0c19000000", "x-ms-version": "2019-12-12" } }, { "method": "PATCH", - "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159239957549208271/file159239957607304880", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159352498324300178/file159352498487800651", "query": { "position": "0", "action": "append" @@ -52,17 +52,17 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Wed, 17 Jun 2020 13:12:56 GMT", + "date": "Tue, 30 Jun 2020 13:49:46 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "be015a43-db81-4565-9efb-ae805883c497", - "x-ms-request-id": "f3d5a32a-101f-0002-33a9-449b11000000", + "x-ms-client-request-id": "268e0f3b-b8e0-4dec-b64d-c89b88a6062d", + "x-ms-request-id": "abbf6b9e-001f-000e-31e5-4e0c19000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2019-12-12" } }, { "method": "PATCH", - "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159239957549208271/file159239957607304880", + "url": "https://fakestorageaccount.dfs.core.windows.net/filesystem159352498324300178/file159352498487800651", "query": { "position": "11", "action": "flush" @@ -72,19 +72,19 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Wed, 17 Jun 2020 13:12:56 GMT", - "etag": "\"0x8D812C02766EFF0\"", - "last-modified": "Wed, 17 Jun 2020 13:12:57 GMT", + "date": "Tue, 30 Jun 2020 13:49:46 GMT", + "etag": "\"0x8D81CFC73979C8F\"", + "last-modified": "Tue, 30 Jun 2020 13:49:46 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "c3fc78ff-d8c7-42d7-9cd4-c3165d322c87", - "x-ms-request-id": "f3d5a32e-101f-0002-37a9-449b11000000", + "x-ms-client-request-id": "28047e9b-0cdb-46ba-96f2-2029308e31fe", + "x-ms-request-id": "abbf6ba0-001f-000e-33e5-4e0c19000000", "x-ms-request-server-encrypted": "false", "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159239957549208271/file159239957607304880", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159352498324300178/file159352498487800651", "query": { "comp": "expiry" }, @@ -93,18 +93,18 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Wed, 17 Jun 2020 13:12:57 GMT", - "etag": "\"0x8D812C02766EFF0\"", - "last-modified": "Wed, 17 Jun 2020 13:12:57 GMT", + "date": "Tue, 30 Jun 2020 13:49:47 GMT", + "etag": "\"0x8D81CFC73979C8F\"", + "last-modified": "Tue, 30 Jun 2020 13:49:46 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "ba0c89c7-29b3-4560-9b09-ccecd898f9bd", - "x-ms-request-id": "6ba7ab58-e01e-0029-40a9-441bdd000000", + "x-ms-client-request-id": "af048384-e07f-4c98-8774-d1944912610a", + "x-ms-request-id": "86fbeca0-e01e-0016-79e5-4ed37e000000", "x-ms-version": "2019-12-12" } }, { "method": "HEAD", - "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159239957549208271/file159239957607304880", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159352498324300178/file159352498487800651", "query": {}, "requestBody": null, "status": 200, @@ -113,43 +113,43 @@ "accept-ranges": "bytes", "content-length": "11", "content-type": "text/plain;charset=UTF-8", - "date": "Wed, 17 Jun 2020 13:12:58 GMT", - "etag": "\"0x8D812C02766EFF0\"", - "last-modified": "Wed, 17 Jun 2020 13:12:57 GMT", + "date": "Tue, 30 Jun 2020 13:49:47 GMT", + "etag": "\"0x8D81CFC73979C8F\"", + "last-modified": "Tue, 30 Jun 2020 13:49:46 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-access-tier": "Hot", "x-ms-access-tier-inferred": "true", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "7fd74207-670a-4f31-b6b4-fae4f90f128b", - "x-ms-creation-time": "Wed, 17 Jun 2020 13:12:56 GMT", - "x-ms-expiry-time": "Wed, 17 Jun 2020 13:13:02 GMT", + "x-ms-client-request-id": "eba765f2-34c2-482b-90ac-f44d8952bc01", + "x-ms-creation-time": "Tue, 30 Jun 2020 13:49:45 GMT", + "x-ms-expiry-time": "Tue, 30 Jun 2020 13:49:52 GMT", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", - "x-ms-request-id": "6ba7ab83-e01e-0029-67a9-441bdd000000", + "x-ms-request-id": "86fbeccc-e01e-0016-18e5-4ed37e000000", "x-ms-server-encrypted": "true", "x-ms-version": "2019-12-12" } }, { "method": "HEAD", - "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159239957549208271/file159239957607304880", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159352498324300178/file159352498487800651", "query": {}, "requestBody": null, "status": 404, "response": "", "responseHeaders": { - "date": "Wed, 17 Jun 2020 13:13:04 GMT", + "date": "Tue, 30 Jun 2020 13:49:53 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "9938eeef-13d7-4aae-84c0-6b6363bfc623", + "x-ms-client-request-id": "7b2fa34b-52be-46d8-b31f-73b616cd7516", "x-ms-error-code": "BlobNotFound", - "x-ms-request-id": "fc7e7cd6-201e-0044-41a9-44af96000000", + "x-ms-request-id": "86fbee46-e01e-0016-4ce5-4ed37e000000", "x-ms-version": "2019-12-12" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159239957549208271", + "url": "https://fakestorageaccount.blob.core.windows.net/filesystem159352498324300178", "query": { "restype": "container" }, @@ -158,22 +158,22 @@ "response": "", "responseHeaders": { "content-length": "0", - "date": "Wed, 17 Jun 2020 13:13:05 GMT", + "date": "Tue, 30 Jun 2020 13:49:53 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "9674e2eb-72e8-4731-ba82-cd1317169c85", - "x-ms-request-id": "fc7e7cf1-201e-0044-54a9-44af96000000", + "x-ms-client-request-id": "19b96757-2e1c-406e-84a7-0d7086500351", + "x-ms-request-id": "86fbee65-e01e-0016-66e5-4ed37e000000", "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "filesystem": "filesystem159239957549208271", - "file": "file159239957607304880" + "filesystem": "filesystem159352498324300178", + "file": "file159352498487800651" }, "newDate": { - "now": "2020-06-17T13:12:57.832Z" + "now": "2020-06-30T13:49:47.617Z" } }, - "hash": "b0e53f88c4a0a0813ccba008a92d426d" + "hash": "c7bd60afc7b99e8133f2a601c5f613e8" } \ No newline at end of file diff --git a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__absolute.js b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__absolute.js index 369b3c507158..40010cb3d69d 100644 --- a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__absolute.js +++ b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient/recording_set_expiry__absolute.js @@ -1,154 +1,144 @@ let nock = require('nock'); -module.exports.hash = "8a1b0b455a3a37375eb859d0bb25954e"; +module.exports.hash = "42ea6f8cd24d4b0d44ffa4ddf236bf54"; -module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem159239944055201355","file":"file159239944181407133"},"newDate":{"now":"2020-06-17T13:10:45.623Z"}} +module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem159352492035906829","file":"file159352492196002191"},"newDate":{"now":"2020-06-30T13:48:43.836Z"}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/filesystem159239944055201355') + .put('/filesystem159352492035906829') .query(true) .reply(201, "", [ - 'content-length', + 'Content-Length', '0', - 'last-modified', - 'Wed, 17 Jun 2020 13:10:41 GMT', - 'etag', - '"0x8D812BFD6512130"', - 'server', + 'Last-Modified', + 'Tue, 30 Jun 2020 13:48:41 GMT', + 'ETag', + '"0x8D81CFC4C618ABE"', + 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'd9dce062-401e-0020-77a8-445e0e000000', + 'e0bc4ebc-201e-006b-19e5-4ea25d000000', 'x-ms-client-request-id', - '27a0dbd3-f1cb-4426-92d3-0de7f27ea9a4', + '5a185975-5ccc-4798-8c9d-a4a24c8d81c0', 'x-ms-version', '2019-12-12', - 'date', - 'Wed, 17 Jun 2020 13:10:41 GMT', - 'connection', - 'close' + 'Date', + 'Tue, 30 Jun 2020 13:48:40 GMT' ]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .put('/filesystem159239944055201355/file159239944181407133') + .put('/filesystem159352492035906829/file159352492196002191') .query(true) .reply(201, "", [ - 'last-modified', - 'Wed, 17 Jun 2020 13:10:42 GMT', - 'etag', - '"0x8D812BFD71556C0"', - 'server', + 'Last-Modified', + 'Tue, 30 Jun 2020 13:48:42 GMT', + 'ETag', + '"0x8D81CFC4D3A1C4B"', + 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '453afe2f-901f-0041-4ca8-447d4d000000', + '7da89b3e-a01f-0028-24e5-4e4401000000', 'x-ms-version', '2019-12-12', 'x-ms-client-request-id', - '06d3f1ca-8245-4728-9597-ea2b89f84dbf', - 'date', - 'Wed, 17 Jun 2020 13:10:42 GMT', - 'connection', - 'close', - 'content-length', + '37091797-e064-4645-b3b5-52208ea00020', + 'Date', + 'Tue, 30 Jun 2020 13:48:42 GMT', + 'Content-Length', '0' ]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .patch('/filesystem159239944055201355/file159239944181407133', "Hello World") + .patch('/filesystem159352492035906829/file159352492196002191', "Hello World") .query(true) .reply(202, "", [ - 'server', + 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-server-encrypted', 'true', 'x-ms-request-id', - 'f1adc691-a01f-0007-45a8-4449ca000000', + '7da89b40-a01f-0028-25e5-4e4401000000', 'x-ms-version', '2019-12-12', 'x-ms-client-request-id', - '53534a54-ece4-4ae8-a466-7e91a46acedb', - 'date', - 'Wed, 17 Jun 2020 13:10:43 GMT', - 'connection', - 'close', - 'content-length', + '4732a7ac-1c45-4333-9b4f-7a209c4aca62', + 'Date', + 'Tue, 30 Jun 2020 13:48:42 GMT', + 'Content-Length', '0' ]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .patch('/filesystem159239944055201355/file159239944181407133') + .patch('/filesystem159352492035906829/file159352492196002191') .query(true) .reply(200, "", [ - 'last-modified', - 'Wed, 17 Jun 2020 13:10:45 GMT', - 'etag', - '"0x8D812BFD89A13E4"', - 'server', + 'Last-Modified', + 'Tue, 30 Jun 2020 13:48:43 GMT', + 'ETag', + '"0x8D81CFC4D9386C4"', + 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-server-encrypted', 'false', 'x-ms-request-id', - 'b452f2ea-801f-003f-25a8-44ed0a000000', + '7da89b42-a01f-0028-26e5-4e4401000000', 'x-ms-version', '2019-12-12', 'x-ms-client-request-id', - '57abdffc-9254-4c5e-81b3-4f7b627599fb', - 'date', - 'Wed, 17 Jun 2020 13:10:45 GMT', - 'connection', - 'close', - 'content-length', + 'e7f455bd-2059-48d8-8d97-a80c99cb9aee', + 'Date', + 'Tue, 30 Jun 2020 13:48:43 GMT', + 'Content-Length', '0' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/filesystem159239944055201355/file159239944181407133') + .put('/filesystem159352492035906829/file159352492196002191') .query(true) .reply(200, "", [ - 'last-modified', - 'Wed, 17 Jun 2020 13:10:45 GMT', - 'etag', - '"0x8D812BFD89A13E4"', - 'server', + 'Last-Modified', + 'Tue, 30 Jun 2020 13:48:43 GMT', + 'ETag', + '"0x8D81CFC4D9386C4"', + 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c75f9e58-f01e-0068-3aa8-444339000000', + 'e0bc4f2d-201e-006b-6fe5-4ea25d000000', 'x-ms-version', '2019-12-12', 'x-ms-client-request-id', - '8570dc7e-9b60-4f6c-82e4-377ab1f8890a', - 'date', - 'Wed, 17 Jun 2020 13:10:46 GMT', - 'connection', - 'close', - 'content-length', + '906a8309-f807-4cc5-9042-ffb24a2bfcfe', + 'Date', + 'Tue, 30 Jun 2020 13:48:43 GMT', + 'Content-Length', '0' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/filesystem159239944055201355/file159239944181407133') + .head('/filesystem159352492035906829/file159352492196002191') .reply(200, "", [ - 'content-length', + 'Content-Length', '11', - 'content-type', + 'Content-Type', 'application/octet-stream', - 'last-modified', - 'Wed, 17 Jun 2020 13:10:45 GMT', - 'accept-ranges', + 'Last-Modified', + 'Tue, 30 Jun 2020 13:48:43 GMT', + 'Accept-Ranges', 'bytes', - 'etag', - '"0x8D812BFD89A13E4"', - 'server', + 'ETag', + '"0x8D81CFC4D9386C4"', + 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '8938495e-c01e-0011-14a8-44bf1d000000', + 'e0bc4f3b-201e-006b-7ae5-4ea25d000000', 'x-ms-client-request-id', - '0f678ca8-58d9-4c29-a33b-f334b9fae6d0', + '124b715a-dd1f-4b80-9da3-9d80039becab', 'x-ms-version', '2019-12-12', 'x-ms-creation-time', - 'Wed, 17 Jun 2020 13:10:42 GMT', + 'Tue, 30 Jun 2020 13:48:42 GMT', 'x-ms-expiry-time', - 'Wed, 17 Jun 2020 13:10:50 GMT', + 'Tue, 30 Jun 2020 13:48:48 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -161,57 +151,51 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Hot', 'x-ms-access-tier-inferred', 'true', - 'access-control-expose-headers', + 'Access-Control-Expose-Headers', 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-expiry-time,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'access-control-allow-origin', + 'Access-Control-Allow-Origin', '*', - 'date', - 'Wed, 17 Jun 2020 13:10:47 GMT', - 'connection', - 'close' + 'Date', + 'Tue, 30 Jun 2020 13:48:43 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/filesystem159239944055201355/file159239944181407133') + .head('/filesystem159352492035906829/file159352492196002191') .reply(404, "", [ - 'transfer-encoding', + 'Transfer-Encoding', 'chunked', - 'server', + 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'caa13950-b01e-0046-7ea8-44112e000000', + 'e0bc504b-201e-006b-58e5-4ea25d000000', 'x-ms-client-request-id', - '9b445a9e-b65c-43fd-982f-84f71e349ee8', + '8e7659fb-a4a0-4117-9022-1c32706231f2', 'x-ms-version', '2019-12-12', 'x-ms-error-code', 'BlobNotFound', - 'access-control-expose-headers', + 'Access-Control-Expose-Headers', 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,x-ms-error-code,Content-Length,Date,Transfer-Encoding', - 'access-control-allow-origin', + 'Access-Control-Allow-Origin', '*', - 'date', - 'Wed, 17 Jun 2020 13:10:53 GMT', - 'connection', - 'close' + 'Date', + 'Tue, 30 Jun 2020 13:48:48 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/filesystem159239944055201355') + .delete('/filesystem159352492035906829') .query(true) .reply(202, "", [ - 'content-length', + 'Content-Length', '0', - 'server', + 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'c9c782f0-f01e-0025-3ba8-448cd5000000', + 'e0bc5055-201e-006b-5ee5-4ea25d000000', 'x-ms-client-request-id', - '26dd64d7-58b7-4487-b6b8-28ea539710cb', + '645421a7-c602-4e6e-900d-df247bccd167', 'x-ms-version', '2019-12-12', - 'date', - 'Wed, 17 Jun 2020 13:10:55 GMT', - 'connection', - 'close' + 'Date', + 'Tue, 30 Jun 2020 13:48:49 GMT' ]); diff --git a/sdk/storage/storage-file-datalake/test/pathclient.spec.ts b/sdk/storage/storage-file-datalake/test/pathclient.spec.ts index 68d5ecc0c046..ae85e074743e 100644 --- a/sdk/storage/storage-file-datalake/test/pathclient.spec.ts +++ b/sdk/storage/storage-file-datalake/test/pathclient.spec.ts @@ -340,14 +340,16 @@ describe("DataLakePathClient", () => { }); it("set expiry - Absolute", async () => { - const now = recorder.newDate("now"); + const now = new Date(); + const recordedNow = recorder.newDate("now"); // Flaky workaround for the recording to work. const delta = 5 * 1000; const expiresOn = new Date(now.getTime() + delta); await fileClient.setExpiry("Absolute", { expiresOn }); const getRes = await fileClient.getProperties(); - expiresOn.setMilliseconds(0); // milliseconds dropped - assert.equal(getRes.expiresOn?.getTime(), expiresOn.getTime()); + const recordedExpiresOn = new Date(recordedNow.getTime() + delta); + recordedExpiresOn.setMilliseconds(0); // milliseconds dropped + assert.equal(getRes.expiresOn?.getTime(), recordedExpiresOn.getTime()); await delay(delta); assert.ok(!(await fileClient.exists()));