From 9b698cda512ed0aed702ffeed941d621bd142f9e Mon Sep 17 00:00:00 2001 From: Peter Dillinger Date: Mon, 17 Apr 2023 14:17:18 -0700 Subject: [PATCH] Update GeneralTableTest::ApproximateOffsetOfCompressed values (#11384) Summary: Because of this failure with snappy 1.1.8, ROCKSDB_NO_FBCODE=1 ``` Value 3531 is not in range [2000, 3525] table/table_test.cc:4231: Failure ``` Pull Request resolved: https://github.com/facebook/rocksdb/pull/11384 Test Plan: run updated test in failing configuration Reviewed By: ajkr Differential Revision: D45057161 Pulled By: pdillinger fbshipit-source-id: 397054f08033315e2e2bd9410f1fa32ddbf3b9c8 --- table/table_test.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/table/table_test.cc b/table/table_test.cc index e2ce3139e..5bdac8bc2 100644 --- a/table/table_test.cc +++ b/table/table_test.cc @@ -4207,6 +4207,7 @@ TEST_F(GeneralTableTest, ApproximateOffsetOfPlain) { } static void DoCompressionTest(CompressionType comp) { + SCOPED_TRACE("CompressionType = " + CompressionTypeToString(comp)); Random rnd(301); TableConstructor c(BytewiseComparator(), true /* convert_to_internal_key_ */); std::string tmp; @@ -4228,8 +4229,8 @@ 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, 3525)); - ASSERT_TRUE(Between(c.ApproximateOffsetOf("k04"), 2000, 3525)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k03"), 2000, 3550)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k04"), 2000, 3550)); ASSERT_TRUE(Between(c.ApproximateOffsetOf("xyz"), 4000, 7075)); c.ResetTableReader(); }