xapian-core
1.4.26
|
tests requiring a database backend supporting transactions More...
#include <config.h>
#include "api_transdb.h"
#include <xapian.h>
#include "apitest.h"
#include "testutils.h"
Go to the source code of this file.
Functions | |
DEFINE_TESTCASE (badtransaction1, transactions) | |
Test incorrect uses of the transaction API lead to errors. More... | |
DEFINE_TESTCASE (committransaction1, transactions) | |
Test committing a simple transaction. More... | |
DEFINE_TESTCASE (canceltransaction1, transactions) | |
Test cancelling a simple transaction. More... | |
DEFINE_TESTCASE (canceltransaction2, transactions) | |
Test that begin_transaction() commits any changes pending before the. More... | |
DEFINE_TESTCASE (canceltransaction3, transactions &&path) | |
Regression test for glass bug fixed in 1.4.6 and 1.5.0. More... | |
tests requiring a database backend supporting transactions
Definition in file api_transdb.cc.
DEFINE_TESTCASE | ( | badtransaction1 | , |
transactions | |||
) |
Test incorrect uses of the transaction API lead to errors.
Definition at line 33 of file api_transdb.cc.
References Xapian::WritableDatabase::begin_transaction(), Xapian::WritableDatabase::cancel_transaction(), Xapian::WritableDatabase::commit_transaction(), get_writable_database(), and TEST_EXCEPTION.
DEFINE_TESTCASE | ( | committransaction1 | , |
transactions | |||
) |
Test committing a simple transaction.
Definition at line 61 of file api_transdb.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::WritableDatabase::begin_transaction(), Xapian::WritableDatabase::commit_transaction(), Xapian::Database::get_doccount(), Xapian::Database::get_termfreq(), get_writable_database(), Xapian::Document::set_data(), TEST_EQUAL, and TEST_EXCEPTION.
DEFINE_TESTCASE | ( | canceltransaction1 | , |
transactions | |||
) |
Test cancelling a simple transaction.
Definition at line 79 of file api_transdb.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::Document::add_value(), Xapian::WritableDatabase::begin_transaction(), Xapian::WritableDatabase::cancel_transaction(), Xapian::Database::get_doccount(), Xapian::Database::get_termfreq(), Xapian::Database::get_value_freq(), Xapian::Database::get_value_lower_bound(), Xapian::Database::get_value_upper_bound(), get_writable_database(), Xapian::Document::set_data(), TEST_EQUAL, and TEST_EXCEPTION.
DEFINE_TESTCASE | ( | canceltransaction2 | , |
transactions | |||
) |
Test that begin_transaction() commits any changes pending before the.
Definition at line 105 of file api_transdb.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::WritableDatabase::begin_transaction(), Xapian::WritableDatabase::cancel_transaction(), Xapian::Database::get_doccount(), Xapian::Database::get_document(), get_writable_database(), Xapian::Document::set_data(), Xapian::Database::term_exists(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | canceltransaction3 | , |
transactions && | path | ||
) |
Regression test for glass bug fixed in 1.4.6 and 1.5.0.
Definition at line 130 of file api_transdb.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::WritableDatabase::begin_transaction(), Xapian::WritableDatabase::cancel_transaction(), Xapian::Database::check(), Xapian::WritableDatabase::commit(), Xapian::DBCHECK_SHOW_STATS, get_named_writable_database(), get_named_writable_database_path(), TEST_EQUAL, and tout.