2018-03-07 12:09:43 +03:00
|
|
|
/*
|
2018-02-04 13:09:18 +03:00
|
|
|
* Copyright 2017-2018 Leonid Yuriev <leo@yuriev.ru>
|
2017-03-30 18:54:57 +03:00
|
|
|
* and other libmdbx authors: please see AUTHORS file.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted only as authorized by the OpenLDAP
|
|
|
|
* Public License.
|
|
|
|
*
|
|
|
|
* A copy of this license is available in the file LICENSE in the
|
|
|
|
* top-level directory of the distribution or, alternatively, at
|
|
|
|
* <http://www.OpenLDAP.org/license.html>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "test.h"
|
|
|
|
|
|
|
|
bool testcase_deadread::setup() {
|
|
|
|
log_trace(">> setup");
|
|
|
|
if (!inherited::setup())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
log_trace("<< setup");
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool testcase_deadread::run() {
|
2017-04-21 18:41:11 +03:00
|
|
|
db_open();
|
2017-10-26 21:14:29 +03:00
|
|
|
txn_begin(true);
|
2017-03-30 18:54:57 +03:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool testcase_deadread::teardown() {
|
|
|
|
log_trace(">> teardown");
|
|
|
|
cursor_guard.release();
|
|
|
|
txn_guard.release();
|
|
|
|
db_guard.release();
|
2017-04-21 18:41:11 +03:00
|
|
|
return inherited::teardown();
|
2017-03-30 18:54:57 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
bool testcase_deadwrite::setup() {
|
|
|
|
log_trace(">> setup");
|
|
|
|
if (!inherited::setup())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
log_trace("<< setup");
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool testcase_deadwrite::run() {
|
2017-04-21 18:41:11 +03:00
|
|
|
db_open();
|
2017-10-26 21:14:29 +03:00
|
|
|
txn_begin(false);
|
2017-03-30 18:54:57 +03:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool testcase_deadwrite::teardown() {
|
|
|
|
log_trace(">> teardown");
|
|
|
|
cursor_guard.release();
|
|
|
|
txn_guard.release();
|
|
|
|
db_guard.release();
|
2017-04-21 18:41:11 +03:00
|
|
|
return inherited::teardown();
|
2017-03-30 18:54:57 +03:00
|
|
|
}
|