Skip to content

Commit 14c8d6c

Browse files
store: Update test to async
Signed-off-by: Maksim Dimitrov <dimitrov.maksim@gmail.com>
1 parent f45feb5 commit 14c8d6c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

store/test-store/tests/postgres/chain_head.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ fn eth_call_cache() {
533533
fn test_disable_call_cache() {
534534
let chain = vec![&*GENESIS_BLOCK, &*BLOCK_ONE, &*BLOCK_TWO];
535535

536-
run_test(chain, |store, _| {
536+
run_test_async(chain, |store, _, _| async move {
537537
ENV_VARS.set_store_call_cache_disabled_for_tests(true);
538538

539539
let logger = LOGGER.cheap_clone();
@@ -544,18 +544,23 @@ fn test_disable_call_cache() {
544544
let call = call::Request::new(address, call.to_vec(), 0);
545545

546546
store
547+
.cheap_clone()
547548
.set_call(
548549
&logger,
549550
call.cheap_clone(),
550551
BLOCK_ONE.block_ptr(),
551552
call::Retval::Value(Bytes::from(return_value)),
552553
)
554+
.await
553555
.unwrap();
554556

555-
let ret = store.get_call(&call, BLOCK_ONE.block_ptr()).unwrap();
557+
let ret = store
558+
.cheap_clone()
559+
.get_call(&call, BLOCK_ONE.block_ptr())
560+
.await
561+
.unwrap();
556562

557563
assert!(ret.is_none());
558-
Ok(())
559564
});
560565
}
561566

0 commit comments

Comments
 (0)