Skip to content

Commit

Permalink
[TrafficController] Fix test_traffic_sketch_with_slow_blocks flakiness (
Browse files Browse the repository at this point in the history
#18603)

## Description 

There is room for precision error here given the nature of this code, so
let's make use of it to fix flakiness.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
  • Loading branch information
williampsmith authored Jul 10, 2024
1 parent d7e2ad1 commit 82d7969
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/sui-e2e-tests/tests/traffic_control_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ async fn test_traffic_sketch_with_slow_blocks() {
assert!(metrics.num_requests < expected_requests + 200);
// due to averaging, we will take 4 seconds to start blocking, then
// will be in blocklist for 1 second (roughly)
assert!(metrics.num_blocked > (expected_requests / 4) - 1_000);
assert!(metrics.num_blocked as f64 > (expected_requests as f64 / 4.0) * 0.90);
// 10 clients, blocked at least every 5 sceonds, over 20 seconds
assert!(metrics.num_blocklist_adds >= 40);
assert!(metrics.abs_time_to_first_block.unwrap() < Duration::from_secs(5));
Expand Down

0 comments on commit 82d7969

Please sign in to comment.