Files
memgraph/tests/integration/query_engine.cpp
Dominik Gleich 8e1a897b7a Fix query integration test because of config. Fix hardcoded queries not working because of include bug.
Summary:
#1 Hardcoded query integration test was failling because the .so files couldn't be linked, because of wrong compiled directory path (missing config flag).
#2 Hardcoded query not working in production because typed_value changed so some includes didn't work.

Reviewers: florijan, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D90
2017-03-07 12:37:30 +01:00

43 lines
1.1 KiB
C++

#define HARDCODED_OUTPUT_STREAM
#include "config/config.hpp"
#include "dbms/dbms.hpp"
#include "query_engine_common.hpp"
using namespace std::chrono_literals;
using namespace tests::integration;
Logger logger;
/**
* IMPORTANT: tests only compilation and executability of implemented
* hard code queries (not correctnes of implementation)
*
* NOTE: The correctnes can be tested by custom Stream object.
* NOTE: This test will be usefull to test generated query plans.
*/
int main(int argc, char *argv[]) {
/**
* init arguments
*/
REGISTER_ARGS(argc, argv);
/**
* init engine
*/
auto log = init_logging("IntegrationQueryEngine");
// Manually set config compile_path to avoid loading whole config file with
// the test.
CONFIG(config::COMPILE_PATH) = "../compiled/";
Dbms dbms;
StreamT stream(std::cout);
QueryEngineT query_engine;
// IMPORTANT: PrintRecordStream can be replaces with a smarter
// object that can test the results
auto db_accessor = dbms.active();
WarmUpEngine(log, query_engine, db_accessor, stream);
return 0;
}