Skip to content

Commit

Permalink
Fix ApproximateOffsetOfCompressed test (#10048)
Browse files Browse the repository at this point in the history
Summary:
#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: #10048

Test Plan: verified the test pass after the change

Reviewed By: cbi42

Differential Revision: D36643688

Pulled By: jay-zhuang

fbshipit-source-id: bf12d211f6ae71937259ef21b1226bd06e8da717
  • Loading branch information
jay-zhuang authored and facebook-github-bot committed May 24, 2022
1 parent 23f34c7 commit a96a4a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion table/table_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit a96a4a2

Please sign in to comment.