From 176fefdebc6eaf77ebde3dc5f27e1489cca2245a Mon Sep 17 00:00:00 2001 From: Duarte Nunes Date: Tue, 16 Jan 2018 13:17:22 +0000 Subject: [PATCH] tests/sstable_utils: Don't assume seastar test context Signed-off-by: Duarte Nunes Message-Id: <20180116131722.86230-1-duarte@scylladb.com> --- tests/sstable_utils.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sstable_utils.hh b/tests/sstable_utils.hh index ecc2cc0d11..9947a7d12d 100644 --- a/tests/sstable_utils.hh +++ b/tests/sstable_utils.hh @@ -43,7 +43,7 @@ static std::vector make_local_keys(unsigned n, const schema_ptr& s, siz auto dk = dht::global_partitioner().decorate_key(*s, partition_key::from_single_value(*s, to_bytes(raw_key))); key_id++; - if (engine().cpu_id() != dht::global_partitioner().shard_of(dk.token())) { + if (engine_is_ready() && engine().cpu_id() != dht::global_partitioner().shard_of(dk.token())) { continue; } generated++;