From b788e3f497cabf4125cda7093883a34b561d06e9 Mon Sep 17 00:00:00 2001 From: mrambacher Date: Tue, 15 Jun 2021 03:43:34 -0700 Subject: [PATCH] Increase range for GeneralTableTest.ApproximateOffsetOfCompressed (#8387) Summary: Newer versions of Snappy (1.1 patch 8) were failing this test because the offsets were outside of the expected range. In some experiments: - On a RH machine with 1.1.0, the offset of "k04" and "xyy" were 3331 and 6665. - On an Ubuntu machine with 1.1.8, the same keys were at 3501 and 7004. - On a Mac with 1.1.8, the offsets were 3499 and 7001. AFAICT, the test environments are either using an older version of Snappy or no Snappy at all. This change increases the range to allow the tests to pass. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8387 Reviewed By: pdillinger Differential Revision: D29064475 Pulled By: mrambacher fbshipit-source-id: fac01927576765b8aff9f57e08a63a2ae210855f --- table/table_test.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/table/table_test.cc b/table/table_test.cc index fd3081e0c0..2c5550a4f7 100644 --- a/table/table_test.cc +++ b/table/table_test.cc @@ -3579,9 +3579,9 @@ static void DoCompressionTest(CompressionType comp) { ASSERT_TRUE(Between(c.ApproximateOffsetOf("abc"), 0, 0)); ASSERT_TRUE(Between(c.ApproximateOffsetOf("k01"), 0, 0)); ASSERT_TRUE(Between(c.ApproximateOffsetOf("k02"), 0, 0)); - ASSERT_TRUE(Between(c.ApproximateOffsetOf("k03"), 2000, 3500)); - ASSERT_TRUE(Between(c.ApproximateOffsetOf("k04"), 2000, 3500)); - ASSERT_TRUE(Between(c.ApproximateOffsetOf("xyz"), 4000, 7000)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k03"), 2000, 3525)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k04"), 2000, 3525)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("xyz"), 4000, 7050)); c.ResetTableReader(); }