Skip to content

Commit

Permalink
test: fix flakiness (#502)
Browse files Browse the repository at this point in the history
## Issue
Fix test_sharding.py flakiness
  • Loading branch information
Gu1nness authored Oct 4, 2024
1 parent 7d6d095 commit c8e621c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/integration/sharding_tests/test_sharding.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ async def test_set_operator_password(ops_test: OpsTest):
apps=CLUSTER_APPS,
status="active",
idle_period=15,
),
)

for cluster_app_name in CLUSTER_APPS:
operator_password = await get_password(
Expand All @@ -161,6 +161,8 @@ async def test_set_operator_password(ops_test: OpsTest):
@pytest.mark.abort_on_fail
async def test_sharding(ops_test: OpsTest) -> None:
"""Tests writing data to mongos gets propagated to shards."""
await ops_test.model.wait_for_idle(apps=CLUSTER_APPS, idle_period=30)

# write data to mongos on both shards.
mongos_client = await generate_mongodb_client(
ops_test, app_name=CONFIG_SERVER_APP_NAME, mongos=True
Expand Down

0 comments on commit c8e621c

Please sign in to comment.