summaryrefslogtreecommitdiff
path: root/test/fops/file.c
diff options
context:
space:
mode:
authorAlex Gorrod <alexg@wiredtiger.com>2012-09-07 16:14:21 +1000
committerAlex Gorrod <alexg@wiredtiger.com>2012-09-07 16:14:21 +1000
commit031de977f249815c69fe5f42f46a1028960f55e1 (patch)
tree0f430eba32379b3681761d848e6d706079644ebe /test/fops/file.c
parentc83edc4cda742c059e766f36e1310673efd5de55 (diff)
downloadmongo-031de977f249815c69fe5f42f46a1028960f55e1.tar.gz
Add a bulk cursor operation into fop test.
Diffstat (limited to 'test/fops/file.c')
-rw-r--r--test/fops/file.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/fops/file.c b/test/fops/file.c
index aa9aa641526..ee4d7d9724f 100644
--- a/test/fops/file.c
+++ b/test/fops/file.c
@@ -8,6 +8,33 @@
#include "thread.h"
void
+obj_bulk(void)
+{
+ WT_CURSOR *c;
+ WT_SESSION *session;
+ int ret;
+
+ if ((ret = conn->open_session(conn, NULL, NULL, &session)) != 0)
+ die("conn.session", ret);
+
+ if ((ret = session->create(session, uri, NULL)) != 0)
+ if (ret != EEXIST)
+ die("session.create", ret);
+
+ if (ret != EEXIST) {
+ if ((ret = session->open_cursor(
+ session, uri, NULL, "bulk", &c)) != 0)
+ die("session.open_cursor", ret);
+
+ /* Sleep so that other threads have a chance to interfere. */
+ sleep(1);
+ c->close(c);
+ }
+ if ((ret = session->close(session, NULL)) != 0)
+ die("session.close", ret);
+}
+
+void
obj_create(void)
{
WT_SESSION *session;