Extract test_partition_key_with_values_of_different_types_read

It will be used also for testing compression.

Signed-off-by: Piotr Jastrzebski <piotr@scylladb.com>
This commit is contained in:
Piotr Jastrzebski
2018-06-04 16:17:33 +02:00
parent 1f324b7fc8
commit be9c7391aa

View File

@@ -437,9 +437,8 @@ static thread_local const schema_ptr PARTITION_KEY_WITH_VALUES_OF_DIFFERENT_TYPE
.with_column("text_val", utf8_type)
.build();
SEASTAR_THREAD_TEST_CASE(test_uncompressed_partition_key_with_values_of_different_types_read) {
sstable_assertions sst(PARTITION_KEY_WITH_VALUES_OF_DIFFERENT_TYPES_SCHEMA,
UNCOMPRESSED_PARTITION_KEY_WITH_VALUES_OF_DIFFERENT_TYPES_PATH);
static void test_partition_key_with_values_of_different_types_read(const sstring& path) {
sstable_assertions sst(PARTITION_KEY_WITH_VALUES_OF_DIFFERENT_TYPES_SCHEMA, path);
sst.load();
auto to_key = [] (int key) {
auto bytes = int32_type->decompose(int32_t(key));
@@ -527,6 +526,11 @@ SEASTAR_THREAD_TEST_CASE(test_uncompressed_partition_key_with_values_of_differen
.produces_end_of_stream();
}
SEASTAR_THREAD_TEST_CASE(test_uncompressed_partition_key_with_values_of_different_types_read) {
test_partition_key_with_values_of_different_types_read(
UNCOMPRESSED_PARTITION_KEY_WITH_VALUES_OF_DIFFERENT_TYPES_PATH);
}
// Following tests run on files in tests/sstables/3.x/uncompressed/subset_of_columns
// They were created using following CQL statements:
//