@ -71,9 +71,12 @@
namespace ROCKSDB_NAMESPACE {
namespace ROCKSDB_NAMESPACE {
// Note that whole DBTest and its child classes disable fsync on files
// and directories for speed.
// If fsync needs to be covered in a test, put it in other places.
class DBTest : public DBTestBase {
class DBTest : public DBTestBase {
public :
public :
DBTest ( ) : DBTestBase ( " /db_test " ) { }
DBTest ( ) : DBTestBase ( " /db_test " , /*env_do_fsync=*/ false ) { }
} ;
} ;
class DBTestWithParam
class DBTestWithParam
@ -1792,7 +1795,6 @@ TEST_F(DBTest, Snapshot) {
TEST_F ( DBTest , HiddenValuesAreRemoved ) {
TEST_F ( DBTest , HiddenValuesAreRemoved ) {
anon : : OptionsOverride options_override ;
anon : : OptionsOverride options_override ;
options_override . skip_policy = kSkipNoSnapshot ;
options_override . skip_policy = kSkipNoSnapshot ;
env_ - > skip_fsync_ = true ;
do {
do {
Options options = CurrentOptions ( options_override ) ;
Options options = CurrentOptions ( options_override ) ;
CreateAndReopenWithCF ( { " pikachu " } , options ) ;
CreateAndReopenWithCF ( { " pikachu " } , options ) ;
@ -4000,7 +4002,6 @@ TEST_F(DBTest, DynamicMemtableOptions) {
const uint64_t k128KB = 1 < < 17 ;
const uint64_t k128KB = 1 < < 17 ;
const uint64_t k5KB = 5 * 1024 ;
const uint64_t k5KB = 5 * 1024 ;
Options options ;
Options options ;
env_ - > skip_fsync_ = true ;
options . env = env_ ;
options . env = env_ ;
options . create_if_missing = true ;
options . create_if_missing = true ;
options . compression = kNoCompression ;
options . compression = kNoCompression ;
@ -5147,7 +5148,6 @@ TEST_F(DBTest, DynamicUniversalCompactionOptions) {
TEST_F ( DBTest , FileCreationRandomFailure ) {
TEST_F ( DBTest , FileCreationRandomFailure ) {
Options options ;
Options options ;
env_ - > skip_fsync_ = true ;
options . env = env_ ;
options . env = env_ ;
options . create_if_missing = true ;
options . create_if_missing = true ;
options . write_buffer_size = 100000 ; // Small write buffer
options . write_buffer_size = 100000 ; // Small write buffer
@ -5504,7 +5504,6 @@ TEST_F(DBTest, MergeTestTime) {
# ifndef ROCKSDB_LITE
# ifndef ROCKSDB_LITE
TEST_P ( DBTestWithParam , MergeCompactionTimeTest ) {
TEST_P ( DBTestWithParam , MergeCompactionTimeTest ) {
SetPerfLevel ( kEnableTime ) ;
SetPerfLevel ( kEnableTime ) ;
env_ - > skip_fsync_ = true ;
Options options = CurrentOptions ( ) ;
Options options = CurrentOptions ( ) ;
options . compaction_filter_factory = std : : make_shared < KeepFilterFactory > ( ) ;
options . compaction_filter_factory = std : : make_shared < KeepFilterFactory > ( ) ;
options . statistics = ROCKSDB_NAMESPACE : : CreateDBStatistics ( ) ;
options . statistics = ROCKSDB_NAMESPACE : : CreateDBStatistics ( ) ;