run functional tests with Replicated engine

This commit is contained in:
Alexander Tokmakov 2020-11-30 23:22:25 +03:00
parent ab197a49c8
commit c955542dce
2 changed files with 15 additions and 2 deletions

View File

@ -132,7 +132,15 @@ BlockIO InterpreterCreateQuery::createDatabase(ASTCreateQuery & create)
bool old_style_database = context.getSettingsRef().default_database_engine.value == DefaultDatabaseEngine::Ordinary;
auto engine = std::make_shared<ASTFunction>();
auto storage = std::make_shared<ASTStorage>();
engine->name = old_style_database ? "Ordinary" : "Atomic";
//FIXME revert it before merge
engine->name = "Atomic";
if (old_style_database)
{
engine = makeASTFunction("Replicated",
std::make_shared<ASTLiteral>(fmt::format("/clickhouse/db/{}/", create.database)),
std::make_shared<ASTLiteral>("s1"),
std::make_shared<ASTLiteral>("r1"));
}
storage->set(storage->engine, engine);
create.set(create.storage, storage);
}

View File

@ -294,6 +294,11 @@ Block DDLQueryStatusInputStream::readImpl()
res = sample.cloneWithColumns(std::move(columns));
}
//FIXME revert it before merge
bool is_functional_tests = !by_hostname && context.getSettingsRef().default_database_engine.value == DefaultDatabaseEngine::Ordinary;
if (is_functional_tests)
return {};
else
return res;
}