Skip to content

Commit

Permalink
run tests in single thread
Browse files Browse the repository at this point in the history
  • Loading branch information
nbaztec committed Jul 30, 2024
1 parent 91ad6fa commit f78e14c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions crates/forge/tests/it/zk/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{config::*, test_helpers::TEST_DATA_DEFAULT};
use forge::revm::primitives::SpecId;
use foundry_test_utils::Filter;

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_block_information_is_consistent() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter =
Expand All @@ -13,15 +13,15 @@ async fn test_zk_block_information_is_consistent() {
TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_address_balance_is_consistent() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testZkBasicAddressBalance", "ZkBasicTest", ".*");

TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_propagated_block_env_is_consistent() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new(
Expand Down
20 changes: 10 additions & 10 deletions crates/forge/tests/it/zk/cheats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,39 @@ use forge::revm::primitives::SpecId;
use foundry_config::fs_permissions::PathPermission;
use foundry_test_utils::Filter;

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_cheat_roll_works() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testZkCheatcodesRoll", "ZkCheatcodesTest", ".*");

TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_cheat_warp_works() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testZkCheatcodesWarp", "ZkCheatcodesTest", ".*");

TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_cheat_deal_works() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testZkCheatcodesDeal", "ZkCheatcodesTest", ".*");

TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_cheat_set_nonce_works() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testZkCheatcodesSetNonce", "ZkCheatcodesTest", ".*");

TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_cheat_etch_works() {
let mut zk_config = TEST_DATA_DEFAULT.zk_test_data.zk_config.clone();
zk_config.fs_permissions.add(PathPermission::read_write("./zk/zkout/ConstantNumber.sol"));
Expand All @@ -47,31 +47,31 @@ async fn test_zk_cheat_etch_works() {
TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_cheat_record_works() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testRecord", "ZkCheatcodesTest", ".*");

TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_cheat_expect_emit_works() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testExpectEmit|testExpectEmitOnCreate", "ZkCheatcodesTest", ".*");

TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_cheat_mock_with_value_function() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testZkCheatcodesValueFunctionMockReturn", "ZkCheatcodesTest", ".*");

TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_cheat_mock_calls() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new(
Expand All @@ -83,7 +83,7 @@ async fn test_zk_cheat_mock_calls() {
TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_cheat_works_after_fork() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testZkCheatcodesCanBeUsedAfterFork", "ZkCheatcodesTest", ".*");
Expand Down
18 changes: 9 additions & 9 deletions crates/forge/tests/it/zk/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use forge::revm::primitives::SpecId;
use foundry_config::fs_permissions::PathPermission;
use foundry_test_utils::Filter;

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_contract_can_call_function() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new(
Expand All @@ -17,23 +17,23 @@ async fn test_zk_contract_can_call_function() {
TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_contract_persisted_contracts_after_fork() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testZkContractsPersistedDeployedContractNoArgs|testZkContractsPersistedDeployedContractArgs", "ZkContractsTest", ".*");

TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_contract_deployment() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testZkContractsInlineDeployedContractNoArgs|testZkContractsInlineDeployedContractComplexArgs", "ZkContractsTest", ".*");

TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_contract_deployment_balance() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter =
Expand All @@ -42,15 +42,15 @@ async fn test_zk_contract_deployment_balance() {
TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_contract_deployment_balance_transfer() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testZkContractsExpectedBalances", "ZkContractsTest", ".*");

TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_contract_create2() {
let mut zk_config = TEST_DATA_DEFAULT.zk_test_data.zk_config.clone();
zk_config.fs_permissions.add(PathPermission::read_write("./zk/zkout/ConstantNumber.sol"));
Expand All @@ -60,23 +60,23 @@ async fn test_zk_contract_create2() {
TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_contract_can_call_system_contracts() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testZkContractsCallSystemContract", "ZkContractsTest", ".*");

TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_contract_deployed_in_setup_can_be_mocked() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testZkContractsDeployedInSetupAreMockable", "ZkContractsTest", ".*");

TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await;
}

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_contract_static_calls_keep_nonce_consistent() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new("testZkStaticCalls", "ZkContractsTest", ".*");
Expand Down
2 changes: 1 addition & 1 deletion crates/forge/tests/it/zk/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{config::*, test_helpers::TEST_DATA_DEFAULT};
use forge::revm::primitives::SpecId;
use foundry_test_utils::Filter;

#[tokio::test(flavor = "multi_thread")]
#[tokio::test]
async fn test_zk_logs_work() {
let runner = TEST_DATA_DEFAULT.runner_zksync();
let filter = Filter::new(".*", "ZkConsoleTest", ".*");
Expand Down

0 comments on commit f78e14c

Please sign in to comment.