diff --git a/tests/mutation_test.cc b/tests/mutation_test.cc index 3795e56323..64f5aacafb 100644 --- a/tests/mutation_test.cc +++ b/tests/mutation_test.cc @@ -68,6 +68,15 @@ static mutation_partition get_partition(memtable& mt, const partition_key& key) return std::move(mo->partition()); } +bytes make_blob(size_t blob_size) { + static thread_local std::independent_bits_engine random_bytes; + bytes big_blob(bytes::initialized_later(), blob_size); + for (auto&& b : big_blob) { + b = random_bytes(); + } + return big_blob; +}; + template future<> with_column_family(schema_ptr s, column_family::config cfg, Func func) { @@ -815,15 +824,6 @@ SEASTAR_TEST_CASE(test_large_blobs) { auto mt = make_lw_shared(s); - auto make_blob = [] (size_t blob_size) -> bytes { - bytes big_blob(bytes::initialized_later(), blob_size); - static thread_local std::independent_bits_engine random_bytes; - for (auto&& b : big_blob) { - b = random_bytes(); - } - return big_blob; - }; - auto blob1 = make_blob(1234567); auto blob2 = make_blob(2345678);