From a96a4a2f7ba7633ab2cc51defd1e923e20d239a6 Mon Sep 17 00:00:00 2001 From: Jay Zhuang Date: Tue, 24 May 2022 16:35:58 -0700 Subject: [PATCH] Fix ApproximateOffsetOfCompressed test (#10048) Summary: https://github.com/facebook/rocksdb/issues/9857 introduced new an option `use_zstd_dict_trainer`, which is stored in SST as text, e.g.: ``` ... zstd_max_train_bytes=0; enabled=0;... ``` it increased the sst size a little bit and cause `ApproximateOffsetOfCompressed` test to fail: ``` Value 7053 is not in range [4000, 7050] table/table_test.cc:4019: Failure Value of: Between(c.ApproximateOffsetOf("xyz"), 4000, 7050) ``` Pull Request resolved: https://github.com/facebook/rocksdb/pull/10048 Test Plan: verified the test pass after the change Reviewed By: cbi42 Differential Revision: D36643688 Pulled By: jay-zhuang fbshipit-source-id: bf12d211f6ae71937259ef21b1226bd06e8da717 --- table/table_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/table/table_test.cc b/table/table_test.cc index 39b27adfc..39f6e1974 100644 --- a/table/table_test.cc +++ b/table/table_test.cc @@ -4016,7 +4016,7 @@ static void DoCompressionTest(CompressionType comp) { 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("xyz"), 4000, 7050)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("xyz"), 4000, 7075)); c.ResetTableReader(); }