2 * See the file LICENSE for redistribution information.
4 * Copyright (c) 2010, 2012 Oracle and/or its affiliates. All rights reserved.
11 #include "test_util.h"
13 int TestSetThreadCount(CuTest *ct) { /* SKIP */
14 /* Run this test only when hash is supported. */
19 CuAssert(ct, "db_env_create", db_env_create(&dbenv, 0) == 0);
21 dbenv->set_errpfx(dbenv, "TestSetThreadCount");
22 CuAssert(ct, "set_thread_count", dbenv->set_thread_count(dbenv, 2) == 0);
23 CuAssert(ct, "env->open", dbenv->open(dbenv, ".",
24 DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL |
25 DB_INIT_TXN | DB_PRIVATE | DB_THREAD, 0) == 0);
27 CuAssert(ct, "db_create", db_create(&db, dbenv, 0) == 0);
28 CuAssert(ct, "DB->open", db->open(
29 db, NULL, NULL, "TestSetThreadCount", DB_HASH, DB_CREATE, 0) == 0);
32 dbenv->close(dbenv, 0);
34 printf("TestSetThreadCount is not supported by the build.\n");
35 #endif /* HAVE_HASH */