Skip to content

Commit 54ab7b2

Browse files
committed
test-store: Use diesel_async::RunQueryDsl in chain_head tests
1 parent acec98f commit 54ab7b2

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

store/test-store/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ graph-chain-ethereum = { path = "../../chain/ethereum" }
1515
lazy_static = "1.5"
1616
hex-literal = "1.0"
1717
diesel = { workspace = true }
18+
diesel-async = { workspace = true }
1819
prost-types = { workspace = true }
1920

2021
[dev-dependencies]

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Test ChainStore implementation of Store, in particular, how
22
//! the chain head pointer gets updated in various situations
33
4-
use diesel::RunQueryDsl;
4+
use diesel_async::RunQueryDsl;
55
use graph::blockchain::{BlockHash, BlockPtr};
66
use graph::data::store::ethereum::call;
77
use graph::data::store::scalar::Bytes;
@@ -575,6 +575,7 @@ fn test_clear_stale_call_cache() {
575575
chain_store.chain
576576
))
577577
.get_result::<Namespace>(&mut conn)
578+
.await
578579
.unwrap()
579580
.namespace;
580581

@@ -589,6 +590,7 @@ fn test_clear_stale_call_cache() {
589590
"UPDATE {meta_table} SET accessed_at = NOW() - INTERVAL '8 days' WHERE contract_address = $1"
590591
)).bind::<diesel::sql_types::Bytea, _>(address.as_bytes())
591592
.execute(&mut conn)
593+
.await
592594
.unwrap();
593595

594596
let result = chain_store.clear_stale_call_cache(7, None).await;

0 commit comments

Comments
 (0)