Skip to content

Commit d7a64a9

Browse files
authored
[Cosmos] skip partition test for SignOff pipeline (Azure#30201)
* removed pytestmark not being used, set timeout and increased split throughput * Update test_partition_split_query.py * re-add cosmosEmulator tag * Revert "re-add cosmosEmulator tag" This reverts commit ab4a153. * Revert "Revert "re-add cosmosEmulator tag"" This reverts commit fabcf59. * Update test_collection_routing_map.py
1 parent d3898ae commit d7a64a9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

sdk/cosmos/azure-cosmos/test/test_partition_split_query.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import azure.cosmos.cosmos_client as cosmos_client
2525
from azure.cosmos import PartitionKey
26+
from azure.cosmos.exceptions import CosmosClientTimeoutError
2627
import pytest
2728
import time
2829
import random
@@ -31,7 +32,6 @@
3132

3233
# This test class serves to test partition splits within the query context
3334

34-
pytestmark = pytest.mark.cosmosEmulator
3535

3636

3737
@pytest.mark.usefixtures("teardown")
@@ -50,13 +50,16 @@ def setUpClass(cls):
5050
id=test_config._test_config.TEST_COLLECTION_SINGLE_PARTITION_ID,
5151
partition_key=PartitionKey(path="/id"))
5252

53+
54+
@pytest.mark.skip # skipping test while staging account issue gets resolved
5355
def test_partition_split_query(self):
5456
for i in range(100):
5557
body = self.get_test_item()
5658
self.container.create_item(body=body)
5759

58-
print("created items, changing offer to 11k and starting queries")
59-
self.database.replace_throughput(11000)
60+
start_time = time.time()
61+
print("created items, changing offer to 22k and starting queries")
62+
self.database.replace_throughput(22000)
6063
offer_time = time.time()
6164
print("changed offer to 11k")
6265
print("--------------------------------")
@@ -66,6 +69,8 @@ def test_partition_split_query(self):
6669
print("initial check succeeded, now reading offer until replacing is done")
6770
offer = self.database.get_throughput()
6871
while True:
72+
if time.time() - start_time > 60 * 20: #timeout test at 20 minutes
73+
raise CosmosClientTimeoutError()
6974
if offer.properties['content'].get('isOfferReplacePending', False):
7075
time.sleep(10)
7176
offer = self.database.get_throughput()

0 commit comments

Comments
 (0)