Skip to content

Commit

Permalink
Fix tests (#4221)
Browse files Browse the repository at this point in the history
* Deactivate stream_limiter

Signed-off-by: Litchi Pi <[email protected]>

* Deactivate stream_limiter entirely

Signed-off-by: Litchi Pi <[email protected]>

* fixup

Signed-off-by: Litchi Pi <[email protected]>

* Add timeout on protocol and optimize operations verifications.

* Update sandbox version

* Remove imcompatibility

* Add timeout of protocol in tests.

* Fix tests without limiter

---------

Signed-off-by: Litchi Pi <[email protected]>
Co-authored-by: Litchi Pi <[email protected]>
  • Loading branch information
AurelienFT and litchipi authored Jul 5, 2023
1 parent 05b7aa0 commit c1b1328
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions massa-bootstrap/src/tests/binders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ fn test_bandwidth() {
_ => panic!("Bad message receive: Expected a peers list message"),
}
let dur = before.elapsed();
assert!(dur > Duration::from_secs(9));
//assert!(dur > Duration::from_secs(9));
assert!(dur < Duration::from_millis(millis_limit));

std::thread::sleep(Duration::from_secs(1));
Expand All @@ -727,7 +727,7 @@ fn test_bandwidth() {
)
.unwrap();
let dur = before.elapsed();
assert!(dur > Duration::from_secs(9), "{dur:?}");
//assert!(dur > Duration::from_secs(9), "{dur:?}");
assert!(dur < Duration::from_millis(millis_limit));
}
})
Expand All @@ -752,7 +752,7 @@ fn test_bandwidth() {
)
.unwrap();
let dur = before.elapsed();
assert!(dbg!(dur) > Duration::from_secs(9), "{dur:?}");
//assert!(dbg!(dur) > Duration::from_secs(9), "{dur:?}");
assert!(dur < Duration::from_millis(millis_limit));

std::thread::sleep(Duration::from_secs(1));
Expand All @@ -765,7 +765,7 @@ fn test_bandwidth() {
_ => panic!("Bad message receive: Expected a peers list message"),
}
let dur = before.elapsed();
assert!(dur > Duration::from_secs(9));
//assert!(dur > Duration::from_secs(9));
assert!(dur < Duration::from_millis(millis_limit));
}
})
Expand Down

0 comments on commit c1b1328

Please sign in to comment.