From 2fcae36d9657c8f7cfbd065a8e8a91fbd464087f Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 7 Jan 2019 21:32:40 +0200 Subject: [PATCH] tests: mutation_source_test: generate valid utf-8 data test_fast_forwarding_across_partitions_to_empty_range uses an uninitialized string to populate an sstable, but this can be invalid utf-8 so that sstable cannot be sstabledumped. Make it valid by using make_random_string(). Fixes #4040. Message-Id: <20190107193240.14409-1-avi@scylladb.com> (cherry picked from commit d8adbeda1114f6cd4a7f88833df5a49d214f3c43) --- tests/mutation_source_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/mutation_source_test.cc b/tests/mutation_source_test.cc index 2a2548dee2..45e1271ec4 100644 --- a/tests/mutation_source_test.cc +++ b/tests/mutation_source_test.cc @@ -32,6 +32,7 @@ #include "mutation_rebuilder.hh" #include "random-utils.hh" #include "cql3/cql3_type.hh" +#include "make_random_string.hh" #include // partitions must be sorted by decorated key @@ -289,7 +290,7 @@ static void test_fast_forwarding_across_partitions_to_empty_range(populate_fn po for (auto&& key : keys) { mutation m(s, key); - sstring val(sstring::initialized_later(), 1024); + sstring val = make_random_string(1024); for (auto i : boost::irange(0u, ckeys_per_part)) { table.add_row(m, table.make_ckey(next_ckey + i), val); }