Skip to content

Commit

Permalink
Merge pull request #2075 from ethereum/skip-huge-test
Browse files Browse the repository at this point in the history
skip large_validator_set tests if too large (mainnet config)
  • Loading branch information
djrtwo authored Sep 18, 2020
2 parents 5374890 + d257926 commit 87220f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/core/pyspec/eth2spec/test/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def low_single_balance(spec):

def large_validator_set(spec):
"""
Helper method to create a series of default balances.
Helper method to create a large series of default balances.
Usage: `@with_custom_state(balances_fn=default_balances, ...)`
"""
num_validators = 2 * spec.SLOTS_PER_EPOCH * spec.MAX_COMMITTEES_PER_SLOT * spec.TARGET_COMMITTEE_SIZE
Expand Down
7 changes: 6 additions & 1 deletion tests/core/pyspec/eth2spec/test/phase0/sanity/test_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
from eth2spec.test.helpers.shard_transitions import get_shard_transition_of_committee

from eth2spec.test.context import (
PHASE0, PHASE1,
PHASE0, PHASE1, MINIMAL,
spec_test, spec_state_test, dump_skipping_message,
with_phases, with_all_phases, single_phase,
expect_assertion_error, always_bls,
disable_process_reveal_deadlines,
with_configs,
with_custom_state,
large_validator_set,
)
Expand Down Expand Up @@ -92,6 +93,8 @@ def test_empty_block_transition(spec, state):


@with_all_phases
@with_configs([MINIMAL],
reason="mainnet config leads to larger validator set than limit of public/private keys pre-generated")
@spec_test
@with_custom_state(balances_fn=large_validator_set, threshold_fn=lambda spec: spec.EJECTION_BALANCE)
@single_phase
Expand Down Expand Up @@ -318,6 +321,8 @@ def test_empty_epoch_transition(spec, state):


@with_all_phases
@with_configs([MINIMAL],
reason="mainnet config leads to larger validator set than limit of public/private keys pre-generated")
@spec_test
@with_custom_state(balances_fn=large_validator_set, threshold_fn=lambda spec: spec.EJECTION_BALANCE)
@single_phase
Expand Down

0 comments on commit 87220f8

Please sign in to comment.