Skip to content

Commit

Permalink
Increase buffer in advancing time tests to 30s (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabijanC authored Dec 8, 2023
1 parent 1a0509d commit 78527de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/starknet-server/tests/test_advancing_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ mod advancing_time_tests {

const DUMMY_ADDRESS: u128 = 1;
const DUMMY_AMOUNT: u128 = 1;
const BUFFER_TIME_SECONDS: u64 = 15;
const BUFFER_TIME_SECONDS: u64 = 30;

pub fn assert_ge_with_buffer(val1: Option<u64>, val2: Option<u64>) {
assert!(val1 >= val2, "Failed inequation: {val1:?} >= {val2:?}");
let upper_limit = Some(val2.unwrap() + BUFFER_TIME_SECONDS);
assert!(val1 <= upper_limit, "Failed inequation: {val1:?} < {upper_limit:?}");
assert!(val1 <= upper_limit, "Failed inequation: {val1:?} <= {upper_limit:?}");
}

pub fn assert_gt_with_buffer(val1: Option<u64>, val2: Option<u64>) {
assert!(val1 > val2, "Failed inequation: {val1:?} > {val2:?}");
let upper_limit = Some(val2.unwrap() + BUFFER_TIME_SECONDS);
assert!(val1 <= upper_limit, "Failed inequation: {val1:?} < {upper_limit:?}");
assert!(val1 <= upper_limit, "Failed inequation: {val1:?} <= {upper_limit:?}");
}

#[tokio::test]
Expand Down

0 comments on commit 78527de

Please sign in to comment.