rocksdb/utilities/ttl
Igor Canadi 3b5fa6bd9b Improve ttl_test
Summary:
Our valgrind tests are failing because ttl_test is kind of flakey. This diff should fix valgrind issue and make ttl_test less flakey and much faster.

Instead of relying on Env::Default() for getting current time, I expose `Env*` to all TTL functions that are interested in time. That way, I can insert a custom test Env which is then used to provide exactly the times we need. That way, we don't need to sleep anymore -- we control the time.

Test Plan: ttl_test in normal and valgrind run

Reviewers: dhruba, haobo, sdong, yhchiang

Reviewed By: haobo

CC: leveldb

Differential Revision: https://reviews.facebook.net/D18399
2014-05-02 07:13:51 -07:00
..
db_ttl_impl.cc Improve ttl_test 2014-05-02 07:13:51 -07:00
db_ttl_impl.h Improve ttl_test 2014-05-02 07:13:51 -07:00
ttl_test.cc Improve ttl_test 2014-05-02 07:13:51 -07:00