Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yield_resume: add more integration tests #11287

Merged
merged 16 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion core/parameters/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ use near_primitives_core::version::PROTOCOL_VERSION;

use super::parameter_table::InvalidConfigError;

// Lowered promise yield timeout length used in integration tests.
// The resharding tests for yield timeouts take too long to run otherwise.
pub const TEST_CONFIG_YIELD_TIMEOUT_LENGTH: u64 = 10;

/// The structure that holds the parameters of the runtime, mostly economics.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct RuntimeConfig {
Expand Down Expand Up @@ -44,7 +48,7 @@ impl RuntimeConfig {
let mut wasm_config =
crate::vm::Config::clone(&config_store.get_config(PROTOCOL_VERSION).wasm_config);
// Lower the yield timeout length so that we can observe timeouts in integration tests.
wasm_config.limit_config.yield_timeout_length_in_blocks = 10;
wasm_config.limit_config.yield_timeout_length_in_blocks = TEST_CONFIG_YIELD_TIMEOUT_LENGTH;

RuntimeConfig {
fees: RuntimeFeesConfig::test(),
Expand Down
1 change: 1 addition & 0 deletions integration-tests/src/tests/client/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ mod simple_test_loop_example;
mod stateless_validation;
mod storage_proof_size_limit;
mod wallet_contract;
mod yield_timeouts;
mod zero_balance_account;