@ -70,9 +70,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
@ -1790,7 +1793,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 ) ;
@ -3995,7 +3997,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 ;
@ -5142,7 +5143,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
@ -5502,7 +5502,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 ( ) ;