test: Squash test::change_generation_number() into test::store()

No other usages of the former helper other than immediatelly followed by
the latter, no point in keepint it around.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
Pavel Emelyanov
2024-10-22 16:03:31 +03:00
parent e885b0e6cd
commit 7595ef7303
2 changed files with 3 additions and 7 deletions

View File

@@ -166,8 +166,7 @@ SEASTAR_TEST_CASE(missing_summary_first_last_sane) {
static future<sstable_ptr> do_write_sst(test_env& env, schema_ptr schema, sstring load_dir, sstring write_dir, sstables::generation_type generation) {
auto sst = co_await env.reusable_sst(std::move(schema), load_dir, generation);
sstable_generation_generator gen(generation.as_int());
sstables::test(sst).change_generation_number(gen());
co_await sstables::test(sst).store(write_dir);
co_await sstables::test(sst).store(write_dir, gen());
co_return sst;
}

View File

@@ -99,10 +99,6 @@ public:
return _sst->_recognized_components;
}
void change_generation_number(sstables::generation_type generation) {
_sst->_generation = generation;
}
void set_data_file_size(uint64_t size) {
_sst->_data_file_size = size;
}
@@ -115,7 +111,8 @@ public:
_sst->_run_identifier = identifier;
}
future<> store(sstring dir) {
future<> store(sstring dir, sstables::generation_type generation) {
_sst->_generation = generation;
co_await _sst->_storage->change_dir_for_test(dir);
_sst->_recognized_components.erase(component_type::Index);
_sst->_recognized_components.erase(component_type::Data);