Skip to content

Commit

Permalink
tests: cql_query_test: Init local cache only once
Browse files Browse the repository at this point in the history
It's a singleton, so we can't attempt to init it more than once.

Fixes cql_query_test failure:

/home/tgrabiec/src/urchin2/seastar/core/future.hh:315: void future_state<>::set(): Assertion `_u.st == state::future' failed.
unknown location(0): fatal error in "test_create_table_statement": signal: SIGABRT (application abort requested)
seastar/tests/test-utils.cc(31): last checkpoint
  • Loading branch information
tgrabiec committed Sep 4, 2015
1 parent 25e4f10 commit 704cfc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/cql_test_env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ future<> init_once(shared_ptr<distributed<database>> db) {
new shared_ptr<distributed<database>>(db);
return init_storage_service(*db).then([] {
return init_ms_fd_gossiper("127.0.0.1", db::config::seed_provider_type());
}).then([] {
return db::system_keyspace::init_local_cache();
});
} else {
return make_ready_future();
Expand All @@ -226,8 +228,6 @@ future<::shared_ptr<cql_test_env>> make_env_for_test() {
mm.start().get();
qp->start(std::ref(proxy), std::ref(*db)).get();

db::system_keyspace::init_local_cache().get();

auto& ss = service::get_local_storage_service();
static bool storage_service_started = false;
if (!storage_service_started) {
Expand Down

0 comments on commit 704cfc1

Please sign in to comment.