From 5826f9528f6c12c50b9b157defbf049c0cd20b9a Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Thu, 27 Mar 2014 11:53:05 -0700 Subject: [PATCH] Make rate limiting unit test more robust --- util/options.cc | 2 +- utilities/backupable/backupable_db_test.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/util/options.cc b/util/options.cc index 7997aa969..c995877da 100644 --- a/util/options.cc +++ b/util/options.cc @@ -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), diff --git a/utilities/backupable/backupable_db_test.cc b/utilities/backupable/backupable_db_test.cc index 62717f5dc..5a0b6928b 100644 --- a/utilities/backupable/backupable_db_test.cc +++ b/utilities/backupable/backupable_db_test.cc @@ -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); }