Skip to content

Commit 8099c79

Browse files
committed
test: cache test
1 parent 46e5bfa commit 8099c79

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/cache.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
use std::time::Duration;
2+
3+
use builder::test_utils::{setup_logging, setup_test_config};
4+
use init4_bin_base::deps::tracing::warn;
5+
6+
#[ignore = "integration test. This test will take >12 seconds to run, and requires Authz configuration env vars."]
7+
#[tokio::test]
8+
async fn test_bundle_poller_roundtrip() -> eyre::Result<()> {
9+
setup_logging();
10+
11+
let config = setup_test_config().unwrap();
12+
13+
let (block_env, _jh) = config.env_task().spawn();
14+
let cache = config.spawn_cache_system(block_env);
15+
16+
tokio::time::sleep(Duration::from_secs(12)).await;
17+
18+
warn!(txns = ?cache.sim_cache.read_best(5));
19+
20+
Ok(())
21+
}

0 commit comments

Comments
 (0)