File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -286,11 +286,14 @@ impl BandwidthSchedulerConfig {
286286 /// Creates a config that effectively disables BandwidthScheduler related limits by setting them
287287 /// to max values. This can be useful for tests and benchmarks.
288288 pub fn test_disabled ( ) -> Self {
289+ // Using `u64::MAX` would lead to overflows as these numbers are used in additions and
290+ // multiplications. The values below are still high enough to effectively disable limits.
291+ let one_tb = 1_000_000_000_000 ;
289292 Self {
290- max_shard_bandwidth : u64 :: MAX ,
291- max_single_grant : u64 :: MAX ,
292- max_allowance : u64 :: MAX ,
293- max_base_bandwidth : u64 :: MAX ,
293+ max_shard_bandwidth : 100 * one_tb ,
294+ max_single_grant : one_tb ,
295+ max_allowance : one_tb ,
296+ max_base_bandwidth : one_tb ,
294297 }
295298 }
296299}
You can’t perform that action at this time.
0 commit comments