Skip to content

Commit 77e4f42

Browse files
committed
reduce block time and unbonding time for faster integration test
1 parent 69b6498 commit 77e4f42

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

integration_tests/configs/staking_cache.jsonnet

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@
9696
config: {
9797
'unsafe-ignore-block-list-failure': true,
9898
consensus: {
99-
timeout_commit: '3s',
100-
create_empty_blocks_interval: '3s',
99+
timeout_commit: '1s',
100+
create_empty_blocks_interval: '1s',
101101
},
102102
},
103103

@@ -221,7 +221,7 @@
221221
},
222222
staking: {
223223
params: {
224-
unbonding_time: '120s',
224+
unbonding_time: '20s',
225225
max_validators: '50',
226226
},
227227
},

integration_tests/test_staking_cache.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ def test_staking_cache_multiple_unbonding(cronos_staking_cache):
182182
)
183183
print(msg)
184184

185-
# Wait for unbonding period to complete (2 minutes, about 40 blocks)
185+
# Wait for unbonding period to complete (20 seconds, 20 blocks)
186186
print("\n=== Phase 4: Waiting for unbonding period to complete ===")
187-
print("Waiting 2 minutes for unbonding delegations to mature...")
188-
wait_for_new_blocks(cli, 40)
187+
print("Waiting 20 seconds for unbonding delegations to mature...")
188+
wait_for_new_blocks(cli, 20)
189189

190190
# Verify unbonding delegations are now empty/matured on all nodes
191191
print(
@@ -347,10 +347,10 @@ def test_staking_cache_multiple_redelegations(cronos_staking_cache):
347347

348348
print(f" ✓ All nodes consistent: {redelegation_counts[0]} redelegation entry")
349349

350-
# Wait for redelegation completion period (2 minutes, about 40 blocks)
350+
# Wait for redelegation completion period (20 seconds, 20 blocks)
351351
print("\n=== Phase 4: Waiting for redelegation completion period ===")
352-
print("Waiting 2 minutes for redelegations to complete...")
353-
wait_for_new_blocks(cli, 40)
352+
print("Waiting 20 seconds for redelegations to complete...")
353+
wait_for_new_blocks(cli, 20)
354354

355355
# Verify redelegations are now empty/completed on all nodes
356356
print("\n=== Phase 5: Verifying redelegations completed (should be empty) ===")
@@ -524,9 +524,9 @@ def test_staking_cache_unbonding_validator(cronos_staking_cache):
524524
), f"Expected BOND_STATUS_UNBONDING but got {unbonding_statuses[0]}"
525525
print("✓ Validator is in BOND_STATUS_UNBONDING on all nodes")
526526

527-
# Wait for unbonding period to complete (2 mins, about 40 blocks)
528-
print("\n=== Phase 4: Waiting for unbonding period (2 minutes) ===")
529-
wait_for_new_blocks(cli, 40)
527+
# Wait for unbonding period to complete (20 seconds, 20 blocks)
528+
print("\n=== Phase 4: Waiting for unbonding period (20 seconds) ===")
529+
wait_for_new_blocks(cli, 20)
530530

531531
# Check validator count after unbonding period
532532
print(
@@ -789,8 +789,8 @@ def test_staking_cache_consistency(cronos_staking_cache):
789789
print("✓ Validator is in BOND_STATUS_UNBONDING on all nodes")
790790

791791
# ========== PHASE 5: Wait for Unbonding Period ==========
792-
print("\n=== Phase 5: Waiting for unbonding period (40 blocks ≈ 2 minutes) ===")
793-
wait_for_new_blocks(cli, 40)
792+
print("\n=== Phase 5: Waiting for unbonding period (20 blocks ≈ 20 seconds) ===")
793+
wait_for_new_blocks(cli, 20)
794794

795795
# ========== PHASE 6: Verify All Matured ==========
796796
print("\n=== Phase 6: Verifying all operations matured ===")

0 commit comments

Comments
 (0)