def test_scan_empty_kv(self): common.create_kv_table() table_name = 'test' scan_file = 'scan.out' common.scan_table(table_name=table_name, file_path=scan_file, allversion=True) nose.tools.assert_true(common.file_is_empty(scan_file)) '''
def test_kv_random_write(self): common.create_kv_table() table_name = 'test' dump_file = 'dump.out' scan_file = 'scan.out' common.run_tera_mark([(dump_file, False)], op='w', table_name='test', random='random', value_size=100, num=5000, key_size=20) common.scan_table(table_name=table_name, file_path=scan_file, allversion=True) nose.tools.assert_true(common.compare_files(dump_file, scan_file, need_sort=True)) '''
def test_showsize_kv_table(self): common.create_kv_table() table_name = "test" scan_file = 'scan.out' common.run_tera_mark([], op='w', table_name='test', random='random', key_seed=1, value_seed=10, value_size=100, num=5000, key_size=20) time.sleep(3) show_ret = common.parse_showinfo() size = float(show_ret[table_name]["size"][:-1]) if size >= 774 * 0.9 and size <= 774 * 1.1: nose.tools.assert_true(True) else: nose.tools.assert_true(False)
def test_kv_random_write(self): common.create_kv_table() table_name = 'test' dump_file = 'dump.out' scan_file = 'scan.out' common.run_tera_mark([(dump_file, False)], op='w', table_name='test', random='random', value_size=100, num=5000, key_size=20) common.scan_table(table_name=table_name, file_path=scan_file, allversion=True) nose.tools.assert_true( common.compare_files(dump_file, scan_file, need_sort=True)) '''
def test_kv_snapshot_relaunch(self): common.create_kv_table() self.kv_snapshot_relaunch() '''