Skip to content

Commit

Permalink
Added more randomness in retry intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehdi-Bendriss committed Oct 26, 2022
1 parent 03e6c29 commit f2ea38f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ jobs:
with:
provider: lxd
- name: Run integration tests
run: tox -e charm-integration
run: |
# set sysctl values in case the cloudinit-userdata not applied
sudo sysctl -w vm.max_map_count=262144
sudo sysctl -w vm.swappiness=0
sudo sysctl -w net.ipv4.tcp_retries2=5
tox -e charm-integration
integration-test-lxd-tls:
name: Integration tests for TLS (lxd)
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/tls/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


@retry(
wait=wait_fixed(wait=3) + wait_random(1, 3),
wait=wait_fixed(wait=5) + wait_random(0, 5),
stop=stop_after_attempt(15),
)
async def check_security_index_initialised(ops_test: OpsTest, unit_ip: str) -> bool:
Expand All @@ -34,7 +34,7 @@ async def check_security_index_initialised(ops_test: OpsTest, unit_ip: str) -> b


@retry(
wait=wait_fixed(wait=3) + wait_random(1, 3),
wait=wait_fixed(wait=5) + wait_random(0, 5),
stop=stop_after_attempt(15),
)
async def check_unit_tls_configured(ops_test: OpsTest, unit_ip: str, unit_name: str) -> bool:
Expand All @@ -53,7 +53,7 @@ async def check_unit_tls_configured(ops_test: OpsTest, unit_ip: str, unit_name:


@retry(
wait=wait_fixed(wait=3) + wait_random(1, 3),
wait=wait_fixed(wait=5) + wait_random(0, 5),
stop=stop_after_attempt(15),
)
async def check_cluster_formation_successful(
Expand Down

0 comments on commit f2ea38f

Please sign in to comment.