@ -628,22 +628,22 @@ TEST_F(ImportColumnFamilyTest, ImportColumnFamilyNegativeTest) {
{
// Create column family with existing cf name.
ExportImportFilesMetaData metadata ;
ASSERT_EQ ( db_ - > CreateColumnFamilyWithImport ( ColumnFamilyOptions ( ) , " koko " ,
metadata . db_comparator_name = options . comparator - > Name ( ) ;
Status s = db_ - > CreateColumnFamilyWithImport ( ColumnFamilyOptions ( ) , " koko " ,
ImportColumnFamilyOptions ( ) ,
metadata , & import_cfh_ ) ,
Status : : InvalidArgument ( " Column family already exists " ) ) ;
metadata , & import_cfh_ ) ;
ASSERT_TRUE ( std : : strstr ( s . getState ( ) , " Column family already exists " ) ) ;
ASSERT_EQ ( import_cfh_ , nullptr ) ;
}
{
// Import with no files specified.
ExportImportFilesMetaData metadata ;
ASSERT_EQ ( db_ - > CreateColumnFamilyWithImport ( ColumnFamilyOptions ( ) , " yoyo " ,
metadata . db_comparator_name = options . comparator - > Name ( ) ;
Status s = db_ - > CreateColumnFamilyWithImport ( ColumnFamilyOptions ( ) , " yoyo " ,
ImportColumnFamilyOptions ( ) ,
metadata , & import_cfh_ ) ,
Status : : InvalidArgument ( " The list of files is empty " ) ) ;
metadata , & import_cfh_ ) ;
ASSERT_TRUE ( std : : strstr ( s . getState ( ) , " The list of files is empty " ) ) ;
ASSERT_EQ ( import_cfh_ , nullptr ) ;
}
@ -693,10 +693,10 @@ TEST_F(ImportColumnFamilyTest, ImportColumnFamilyNegativeTest) {
LiveFileMetaDataInit ( file1_sst_name , sst_files_dir_ , 1 , 10 , 19 ) ) ;
metadata . db_comparator_name = mismatch_options . comparator - > Name ( ) ;
ASSERT_EQ ( db_ - > CreateColumnFamilyWithImport ( ColumnFamilyOptions ( ) , " coco " ,
Status s = db_ - > CreateColumnFamilyWithImport ( ColumnFamilyOptions ( ) , " coco " ,
ImportColumnFamilyOptions ( ) ,
metadata , & import_cfh_ ) ,
Status : : InvalidArgument ( " Comparator name mismatch " ) ) ;
metadata , & import_cfh_ ) ;
ASSERT_TRUE ( std : : strstr ( s . getState ( ) , " Comparator name mismatch " ) ) ;
ASSERT_EQ ( import_cfh_ , nullptr ) ;
}
@ -718,10 +718,10 @@ TEST_F(ImportColumnFamilyTest, ImportColumnFamilyNegativeTest) {
LiveFileMetaDataInit ( file3_sst_name , sst_files_dir_ , 1 , 10 , 19 ) ) ;
metadata . db_comparator_name = options . comparator - > Name ( ) ;
ASSERT_EQ ( db_ - > CreateColumnFamilyWithImport ( ColumnFamilyOptions ( ) , " yoyo " ,
Status s = db_ - > CreateColumnFamilyWithImport ( ColumnFamilyOptions ( ) , " yoyo " ,
ImportColumnFamilyOptions ( ) ,
metadata , & import_cfh_ ) ,
Status : : IOError ( " No such file or directory " ) ) ;
metadata , & import_cfh_ ) ;
ASSERT_TRUE ( std : : strstr ( s . getState ( ) , " No such file or directory " ) ) ;
ASSERT_EQ ( import_cfh_ , nullptr ) ;
// Test successful import after a failure with the same CF name. Ensures