Skip to content

Commit

Permalink
Revert "test: test many snapshots"
Browse files Browse the repository at this point in the history
This reverts commit 4e14608.
  • Loading branch information
AlbertoCentonze committed Oct 9, 2024
1 parent 4e14608 commit f8c27de
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions tests/unitary/twa/test_internal_take_snapshot.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import boa
import pytest


def test_add_single_snapshot(setup_rewards_handler, snapshot_amount):
Expand Down Expand Up @@ -46,21 +45,3 @@ def test_add_snapshot_after_min_interval(setup_rewards_handler, snapshot_amount,
# Verify that the snapshot was added
final_len = rewards_handler.get_len_snapshots()
assert final_len == 2, f"Expected 2 snapshots, got {final_len}"


@pytest.mark.gas_profile
def test_many_snapshots(setup_rewards_handler, snapshot_amount, snapshot_interval):
rewards_handler = setup_rewards_handler
N_SNAPSHOTS = 10_000
for i in range(N_SNAPSHOTS):
# Take a snapshot
rewards_handler.eval(f"twa._take_snapshot({snapshot_amount})")

# Time travel beyond min_snapshot_dt_seconds and take another snapshot
boa.env.time_travel(
seconds=snapshot_interval + 10
) # Total of snapshot_interval + 10 seconds passed

# Verify that the snapshots were added
final_len = rewards_handler.get_len_snapshots()
assert final_len == N_SNAPSHOTS, f"Expected {N_SNAPSHOTS} snapshots, got {final_len}"

0 comments on commit f8c27de

Please sign in to comment.