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
oxigraph-8.3.2
Peter Dillinger 2 years ago committed by Facebook GitHub Bot
parent f3818948e8
commit 9b698cda51
  1. 5
      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();
}

Loading…
Cancel
Save