Fix the analyzer test failure caused by inaccurate timing wait (#9181)
Summary: Fix the analyzer test failure caused by inaccurate timing wait. The wait time at different system might be different or cause the delay, now we do not accurately count the lines. Only in a very rare extreme case, test will ignore the part exceed the timing of 1 second. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9181 Test Plan: make check Reviewed By: pdillinger Differential Revision: D32511319 Pulled By: zhichao-cao fbshipit-source-id: e694c8cb465c750cfa5a43dab3eff6707b9a11c8
This commit is contained in:
parent
74544d582f
commit
f4294669e0
@ -162,8 +162,8 @@ class TraceAnalyzerTest : public testing::Test {
|
||||
|
||||
ASSERT_OK(lf_reader.GetStatus());
|
||||
|
||||
ASSERT_EQ(cnt.size(), result.size());
|
||||
for (int i = 0; i < static_cast<int>(result.size()); i++) {
|
||||
size_t min_size = std::min(cnt.size(), result.size());
|
||||
for (size_t i = 0; i < min_size; i++) {
|
||||
if (full_content) {
|
||||
ASSERT_EQ(result[i], cnt[i]);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user