From a797c952280d4de77b8150863acf78304ce255d2 Mon Sep 17 00:00:00 2001 From: seankane-msft Date: Mon, 30 Nov 2020 13:37:52 -0800 Subject: [PATCH] fixing a transient test error --- ...ync.test_list_tables_with_num_results.yaml | 106 ++++++++++++------ .../tests/test_table_async.py | 5 + 2 files changed, 74 insertions(+), 37 deletions(-) diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_list_tables_with_num_results.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_list_tables_with_num_results.yaml index cce3e423b738..a35f08fa8309 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_list_tables_with_num_results.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_list_tables_with_num_results.yaml @@ -1,4 +1,36 @@ interactions: +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Mon, 30 Nov 2020 21:35:12 GMT + User-Agent: + - azsdk-python-data-tables/12.0.0b3 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Mon, 30 Nov 2020 21:35:12 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://tablesteststorname.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://tablesteststorname.table.core.windows.net/$metadata#Tables","value":[]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Mon, 30 Nov 2020 21:35:13 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://tablestestwulynnboioche4.table.core.windows.net/Tables - request: body: '{"TableName": "listtable0cac14c3"}' headers: @@ -11,11 +43,11 @@ interactions: DataServiceVersion: - '3.0' Date: - - Tue, 17 Nov 2020 01:47:43 GMT + - Mon, 30 Nov 2020 21:35:13 GMT User-Agent: - - azsdk-python-data-tables/12.0.0a20201110001 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b3 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 17 Nov 2020 01:47:43 GMT + - Mon, 30 Nov 2020 21:35:13 GMT x-ms-version: - '2019-02-02' method: POST @@ -26,7 +58,7 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Tue, 17 Nov 2020 01:47:44 GMT + date: Mon, 30 Nov 2020 21:35:13 GMT location: https://tablesteststorname.table.core.windows.net/Tables('listtable0cac14c3') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked @@ -35,7 +67,7 @@ interactions: status: code: 201 message: Created - url: https://tablestestkxtvva72iqu555.table.core.windows.net/Tables + url: https://tablestestwulynnboioche4.table.core.windows.net/Tables - request: body: '{"TableName": "listtable1cac14c3"}' headers: @@ -48,11 +80,11 @@ interactions: DataServiceVersion: - '3.0' Date: - - Tue, 17 Nov 2020 01:47:44 GMT + - Mon, 30 Nov 2020 21:35:13 GMT User-Agent: - - azsdk-python-data-tables/12.0.0a20201110001 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b3 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 17 Nov 2020 01:47:44 GMT + - Mon, 30 Nov 2020 21:35:13 GMT x-ms-version: - '2019-02-02' method: POST @@ -63,7 +95,7 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Tue, 17 Nov 2020 01:47:44 GMT + date: Mon, 30 Nov 2020 21:35:13 GMT location: https://tablesteststorname.table.core.windows.net/Tables('listtable1cac14c3') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked @@ -72,7 +104,7 @@ interactions: status: code: 201 message: Created - url: https://tablestestkxtvva72iqu555.table.core.windows.net/Tables + url: https://tablestestwulynnboioche4.table.core.windows.net/Tables - request: body: '{"TableName": "listtable2cac14c3"}' headers: @@ -85,11 +117,11 @@ interactions: DataServiceVersion: - '3.0' Date: - - Tue, 17 Nov 2020 01:47:44 GMT + - Mon, 30 Nov 2020 21:35:13 GMT User-Agent: - - azsdk-python-data-tables/12.0.0a20201110001 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b3 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 17 Nov 2020 01:47:44 GMT + - Mon, 30 Nov 2020 21:35:13 GMT x-ms-version: - '2019-02-02' method: POST @@ -100,7 +132,7 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Tue, 17 Nov 2020 01:47:44 GMT + date: Mon, 30 Nov 2020 21:35:13 GMT location: https://tablesteststorname.table.core.windows.net/Tables('listtable2cac14c3') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked @@ -109,7 +141,7 @@ interactions: status: code: 201 message: Created - url: https://tablestestkxtvva72iqu555.table.core.windows.net/Tables + url: https://tablestestwulynnboioche4.table.core.windows.net/Tables - request: body: '{"TableName": "listtable3cac14c3"}' headers: @@ -122,11 +154,11 @@ interactions: DataServiceVersion: - '3.0' Date: - - Tue, 17 Nov 2020 01:47:44 GMT + - Mon, 30 Nov 2020 21:35:13 GMT User-Agent: - - azsdk-python-data-tables/12.0.0a20201110001 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b3 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 17 Nov 2020 01:47:44 GMT + - Mon, 30 Nov 2020 21:35:13 GMT x-ms-version: - '2019-02-02' method: POST @@ -137,7 +169,7 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Tue, 17 Nov 2020 01:47:44 GMT + date: Mon, 30 Nov 2020 21:35:13 GMT location: https://tablesteststorname.table.core.windows.net/Tables('listtable3cac14c3') server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked @@ -146,7 +178,7 @@ interactions: status: code: 201 message: Created - url: https://tablestestkxtvva72iqu555.table.core.windows.net/Tables + url: https://tablestestwulynnboioche4.table.core.windows.net/Tables - request: body: null headers: @@ -155,11 +187,11 @@ interactions: DataServiceVersion: - '3.0' Date: - - Tue, 17 Nov 2020 01:47:44 GMT + - Mon, 30 Nov 2020 21:35:13 GMT User-Agent: - - azsdk-python-data-tables/12.0.0a20201110001 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b3 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 17 Nov 2020 01:47:44 GMT + - Mon, 30 Nov 2020 21:35:13 GMT x-ms-version: - '2019-02-02' method: GET @@ -170,7 +202,7 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Tue, 17 Nov 2020 01:47:44 GMT + date: Mon, 30 Nov 2020 21:35:13 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff @@ -178,7 +210,7 @@ interactions: status: code: 200 message: OK - url: https://tablestestkxtvva72iqu555.table.core.windows.net/Tables + url: https://tablestestwulynnboioche4.table.core.windows.net/Tables - request: body: null headers: @@ -187,11 +219,11 @@ interactions: DataServiceVersion: - '3.0' Date: - - Tue, 17 Nov 2020 01:47:44 GMT + - Mon, 30 Nov 2020 21:35:13 GMT User-Agent: - - azsdk-python-data-tables/12.0.0a20201110001 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b3 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 17 Nov 2020 01:47:44 GMT + - Mon, 30 Nov 2020 21:35:13 GMT x-ms-version: - '2019-02-02' method: GET @@ -202,16 +234,16 @@ interactions: headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Tue, 17 Nov 2020 01:47:44 GMT + date: Mon, 30 Nov 2020 21:35:13 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff - x-ms-continuation-nexttablename: 1!48!bGlzdHRhYmxlM2NhYzE0YzMBMDFkNmJjODNhNTI1NmVjNQ-- + x-ms-continuation-nexttablename: 1!48!bGlzdHRhYmxlM2NhYzE0YzMBMDFkNmM3NjBiMDBjMTg3NQ-- x-ms-version: '2019-02-02' status: code: 200 message: OK - url: https://tablestestkxtvva72iqu555.table.core.windows.net/Tables?$top=3 + url: https://tablestestwulynnboioche4.table.core.windows.net/Tables?$top=3 - request: body: null headers: @@ -220,22 +252,22 @@ interactions: DataServiceVersion: - '3.0' Date: - - Tue, 17 Nov 2020 01:47:44 GMT + - Mon, 30 Nov 2020 21:35:13 GMT User-Agent: - - azsdk-python-data-tables/12.0.0a20201110001 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/12.0.0b3 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 17 Nov 2020 01:47:44 GMT + - Mon, 30 Nov 2020 21:35:13 GMT x-ms-version: - '2019-02-02' method: GET - uri: https://tablesteststorname.table.core.windows.net/Tables?$top=3&NextTableName=1!48!bGlzdHRhYmxlM2NhYzE0YzMBMDFkNmJjODNhNTI1NmVjNQ-- + uri: https://tablesteststorname.table.core.windows.net/Tables?$top=3&NextTableName=1!48!bGlzdHRhYmxlM2NhYzE0YzMBMDFkNmM3NjBiMDBjMTg3NQ-- response: body: string: '{"odata.metadata":"https://tablesteststorname.table.core.windows.net/$metadata#Tables","value":[{"TableName":"listtable3cac14c3"}]}' headers: cache-control: no-cache content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 - date: Tue, 17 Nov 2020 01:47:44 GMT + date: Mon, 30 Nov 2020 21:35:13 GMT server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-content-type-options: nosniff @@ -243,5 +275,5 @@ interactions: status: code: 200 message: OK - url: https://tablestestkxtvva72iqu555.table.core.windows.net/Tables?$top=3&NextTableName=1!48!bGlzdHRhYmxlM2NhYzE0YzMBMDFkNmJjODNhNTI1NmVjNQ-- + url: https://tablestestwulynnboioche4.table.core.windows.net/Tables?$top=3&NextTableName=1!48!bGlzdHRhYmxlM2NhYzE0YzMBMDFkNmM3NjBiMDBjMTg3NQ-- version: 1 diff --git a/sdk/tables/azure-data-tables/tests/test_table_async.py b/sdk/tables/azure-data-tables/tests/test_table_async.py index 24852b0a9655..f5b215159db1 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_async.py +++ b/sdk/tables/azure-data-tables/tests/test_table_async.py @@ -197,6 +197,11 @@ async def test_list_tables_with_num_results(self, resource_group, location, stor prefix = 'listtable' account_url = self.account_url(storage_account, "table") ts = self.create_client_from_credential(TableServiceClient, storage_account_key, account_url=account_url) + + # Delete any existing tables + async for table in ts.list_tables(): + await ts.delete_table(table.table_name) + table_list = [] for i in range(0, 4): await self._create_table(ts, prefix + str(i), table_list)