Fix ThreadLocalTest.SequentialReadWriteTest failure when running individually (#6929)
Summary: When running ThreadLocalTest.SequentialReadWriteTest individually, the test fails with: ] ./thread_local_test --gtest_filter="*SequentialReadWriteTest*" Note: Google Test filter = *SequentialReadWriteTest* [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from ThreadLocalTest [ RUN ] ThreadLocalTest.SequentialReadWriteTest internal_repo_rocksdb/repo/util/thread_local_test.cc:144: Failure Expected: IDChecker::PeekId() Which is: 3 To be equal to: base_id + 1u Which is: 2 [ FAILED ] ThreadLocalTest.SequentialReadWriteTest (1 ms) [----------] 1 test from ThreadLocalTest (1 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (1 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] ThreadLocalTest.SequentialReadWriteTest 1 FAILED TEST It appears that when running as the first test, PeakId() was updated twice. I didn't dig into it why but it doesn't seem to break the contract. Relax the assertion to make it pass. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6929 Test Plan: Run the test individually and as the whole thread_local_test Reviewed By: riversand963 Differential Revision: D21873999 fbshipit-source-id: 1dcb6a2e9c38b6afd848027308bfe633342b7548main
parent
e85cbdb4e8
commit
31bd2d790e
Loading…
Reference in new issue