mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 01:44:13 +08:00
mdbx-test: фиксация транзакции при ошибках теста для последующего анализа БД.
This commit is contained in:
parent
d53dc4572c
commit
d7f259110c
@ -753,6 +753,18 @@ void testcase::speculum_check_iterator(const char *where, const char *stage,
|
||||
mdbx_dump_val(&v, dump_value, sizeof(dump_value)));
|
||||
}
|
||||
|
||||
void testcase::failure(const char *fmt, ...) const {
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
fflush(nullptr);
|
||||
logging::output_nocheckloglevel_ap(logging::failure, fmt, ap);
|
||||
va_end(ap);
|
||||
fflush(nullptr);
|
||||
if (txn_guard)
|
||||
mdbx_txn_commit(const_cast<testcase *>(this)->txn_guard.release());
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#if SPECULUM_CURSORS
|
||||
void testcase::speculum_check_cursor(const char *where, const char *stage,
|
||||
const testcase::SET::const_iterator &it,
|
||||
|
@ -281,6 +281,7 @@ protected:
|
||||
void signal();
|
||||
bool should_continue(bool check_timeout_only = false) const;
|
||||
|
||||
void failure(const char *fmt, ...) const;
|
||||
void generate_pair(const keygen::serial_t serial, keygen::buffer &out_key,
|
||||
keygen::buffer &out_value, keygen::serial_t data_age) {
|
||||
keyvalue_maker.pair(serial, out_key, out_value, data_age, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user