3750fbc093
Summary: Depends on D2471 - Add pointer to storage to `InterpreterContext` - Rename `operator()` to `Prepare` - Use `Interpret` instead of `operator()` (`Interpret` will be removed soon) - Remove the `in_explicit_transaction` parameter - Remove the memory resource parameter from `Interpret` - Remove the storage accessor parameter from `Interpret` - Fix up tests (remove the `Interpreter` from `database_transaction_timeout`) Reviewers: teon.banek, mferencevic Reviewed By: teon.banek Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D2482
18 lines
438 B
C++
18 lines
438 B
C++
#include <glog/logging.h>
|
|
#include <gtest/gtest.h>
|
|
|
|
#include "communication/result_stream_faker.hpp"
|
|
#include "query/exceptions.hpp"
|
|
#include "query/interpreter.hpp"
|
|
|
|
DECLARE_int32(query_execution_time_sec);
|
|
|
|
TEST(TransactionTimeout, TransactionTimeout) {
|
|
FLAGS_query_execution_time_sec = 3;
|
|
database::GraphDb db;
|
|
|
|
auto dba = db.Access();
|
|
std::this_thread::sleep_for(std::chrono::seconds(5));
|
|
ASSERT_TRUE(dba.should_abort());
|
|
}
|