Skip to content

Commit de9ee48

Browse files
committed
test fixes
1 parent 1aad232 commit de9ee48

File tree

4 files changed

+12
-20
lines changed

4 files changed

+12
-20
lines changed

Cargo.lock

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

crates/tap-agent/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ ractor = { version = "0.14", features = [
4444
], default-features = false }
4545
tap_aggregator.workspace = true
4646
futures = { version = "0.3.30", default-features = false }
47-
env_logger = '*'
48-
log = '*'
4947

5048
[dev-dependencies]
5149
tempfile = "3.8.0"

crates/tap-agent/src/agent/sender_account.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,8 @@ pub mod tests {
10811081
// we implement the PartialEq and Eq traits for SenderAccountMessage to be able to compare
10821082
impl Eq for SenderAccountMessage {}
10831083

1084+
const RAV_REQUEST_TIMEOUT: Duration = Duration::from_secs(60);
1085+
const TAP_SENDER_TIMEOUT: Duration = Duration::from_secs(30);
10841086
impl PartialEq for SenderAccountMessage {
10851087
fn eq(&self, other: &Self) -> bool {
10861088
match (self, other) {
@@ -1181,11 +1183,11 @@ pub mod tests {
11811183
rav_request_buffer: BUFFER_DURATION,
11821184
max_amount_willing_to_lose_grt,
11831185
trigger_value: rav_request_trigger_value,
1184-
rav_request_timeout: Duration::from_secs(60),
1186+
rav_request_timeout: RAV_REQUEST_TIMEOUT,
11851187
rav_request_receipt_limit,
11861188
indexer_address: INDEXER.1,
11871189
escrow_polling_interval: Duration::default(),
1188-
tap_sender_timeout: Duration::from_secs(30),
1190+
tap_sender_timeout: TAP_SENDER_TIMEOUT,
11891191
}));
11901192

11911193
let network_subgraph = Box::leak(Box::new(

crates/tap-agent/src/agent/sender_accounts_manager.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,10 @@ mod tests {
641641
const DUMMY_URL: &str = "http://localhost:1234";
642642
const TRIGGER_VALUE: u128 = 100;
643643
const ESCROW_VALUE: u128 = 1000;
644+
const RAV_REQUEST_BUFFER: Duration = Duration::from_secs(60);
645+
const RAV_REQUEST_TIMEOUT: Duration = Duration::from_secs(30);
646+
const ESCROW_POLLING_INTERVAL: Duration = Duration::from_secs(30);
647+
const TAP_SENDER_TIMEOUT: Duration = Duration::from_secs(63);
644648

645649
async fn mock_escrow_subgraph_empty_response() -> (MockServer, MockGuard) {
646650
let mock_ecrow_subgraph_server: MockServer = MockServer::start().await;
@@ -670,14 +674,14 @@ mod tests {
670674

671675
fn get_config() -> &'static SenderAccountConfig {
672676
Box::leak(Box::new(SenderAccountConfig {
673-
rav_request_buffer: Duration::from_secs(30),
677+
rav_request_buffer: RAV_REQUEST_BUFFER,
674678
max_amount_willing_to_lose_grt: TRIGGER_VALUE + 100,
675679
trigger_value: TRIGGER_VALUE,
676-
rav_request_timeout: Duration::from_secs(30),
680+
rav_request_timeout: RAV_REQUEST_TIMEOUT,
677681
rav_request_receipt_limit: 1000,
678682
indexer_address: INDEXER.1,
679-
escrow_polling_interval: Duration::from_secs(30),
680-
tap_sender_timeout: Duration::from_secs(30),
683+
escrow_polling_interval: ESCROW_POLLING_INTERVAL,
684+
tap_sender_timeout: TAP_SENDER_TIMEOUT,
681685
}))
682686
}
683687

0 commit comments

Comments
 (0)