Add a way to skip tests that rely on diagnostic builds. Use that for the out-of-order bulk-load test.

This commit is contained in:
Michael Cahill
2014-07-30 15:37:51 +10:00
parent 564bbfd67a
commit 0ffb202652
2 changed files with 13 additions and 2 deletions

View File

@@ -783,6 +783,14 @@ typedef int int_void;
int _freecb() {
return (0);
}
int diagnostic_build() {
#ifdef HAVE_DIAGNOSTIC
return 1;
#else
return 0;
#endif
}
};
/* Remove / rename parts of the C API that we don't want in Python. */

View File

@@ -100,10 +100,13 @@ class test_bulk_load_row_order(wttest.WiredTigerTestCase):
cursor.set_value(value_populate(cursor, 1))
cursor.insert()
if not self.conn.diagnostic_build():
self.skipTest('requires a diagnostic build')
# Close explicitly, there's going to be a fallure.
msg = '/are incorrectly sorted/'
self.assertRaisesWithMessage(
wiredtiger.WiredTigerError, lambda: self.conn.close(), msg)
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
lambda: self.conn.close(), msg)
# Test that inserting into the file blocks a subsequent bulk-load.