Make rate limiting unit test more robust
This commit is contained in:
parent
1c9f8f0884
commit
5826f9528f
@ -91,7 +91,7 @@ Options::Options()
|
||||
purge_redundant_kvs_while_flush(true),
|
||||
allow_os_buffer(true),
|
||||
allow_mmap_reads(false),
|
||||
allow_mmap_writes(true),
|
||||
allow_mmap_writes(false),
|
||||
is_fd_close_on_exec(true),
|
||||
skip_log_error_on_recovery(false),
|
||||
stats_dump_period_sec(3600),
|
||||
|
@ -826,7 +826,7 @@ TEST(BackupableDBTest, RateLimiting) {
|
||||
auto rate_limited_backup_time = (bytes_written * kMicrosPerSec) /
|
||||
backupable_options_->backup_rate_limit;
|
||||
ASSERT_GT(backup_time, 0.9 * rate_limited_backup_time);
|
||||
ASSERT_LT(backup_time, 1.3 * rate_limited_backup_time);
|
||||
ASSERT_LT(backup_time, 1.5 * rate_limited_backup_time);
|
||||
|
||||
CloseBackupableDB();
|
||||
|
||||
@ -838,7 +838,7 @@ TEST(BackupableDBTest, RateLimiting) {
|
||||
auto rate_limited_restore_time = (bytes_written * kMicrosPerSec) /
|
||||
backupable_options_->restore_rate_limit;
|
||||
ASSERT_GT(restore_time, 0.9 * rate_limited_restore_time);
|
||||
ASSERT_LT(restore_time, 1.3 * rate_limited_restore_time);
|
||||
ASSERT_LT(restore_time, 1.5 * rate_limited_restore_time);
|
||||
|
||||
AssertBackupConsistency(0, 0, 100000, 100010);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user