You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2011/06/09 20:53:13 UTC
svn commit: r1134037 - /subversion/trunk/subversion/tests/libsvn_wc/utils.c
Author: pburba
Date: Thu Jun 9 18:53:13 2011
New Revision: 1134037
URL: http://svn.apache.org/viewvc?rev=1134037&view=rev
Log:
Fix some C-test failures with BDB backend.
* subversion/tests/libsvn_wc/utils.c
(create_repos_and_wc): BDB 4.4+ allows only a single environment handle
to be open per process, so create the test repository with a subpool then
destroy the subpool so the repository's underlying filesystem is closed.
This avoids any attempt to open a second environment handle within the
same process when we later checkout a WC from the test repos. This
solves the failures I reported here
http://svn.haxx.se/dev/archive-2011-06/0211.shtml
Modified:
subversion/trunk/subversion/tests/libsvn_wc/utils.c
Modified: subversion/trunk/subversion/tests/libsvn_wc/utils.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/utils.c?rev=1134037&r1=1134036&r2=1134037&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/utils.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/utils.c Thu Jun 9 18:53:13 2011
@@ -22,6 +22,7 @@
#include "svn_error.h"
#include "svn_client.h"
+#include "svn_pools.h"
#include "utils.h"
@@ -66,8 +67,16 @@ create_repos_and_wc(const char **repos_u
{
svn_repos_t *repos;
- SVN_ERR(svn_test__create_repos(&repos, repos_path, opts, pool));
+ /* Use a subpool to create the repository and then destroy the subpool
+ so the repository's underlying filesystem is closed. If opts->fs_type
+ is BDB this prevents any attempt to open a second environment handle
+ within the same process when we checkout the WC below. BDB 4.4+ allows
+ only a single environment handle to be open per process. */
+ apr_pool_t *subpool = svn_pool_create(pool);
+
+ SVN_ERR(svn_test__create_repos(&repos, repos_path, opts, subpool));
SVN_ERR(svn_uri_get_file_url_from_dirent(repos_url, repos_path, pool));
+ svn_pool_destroy(subpool);
}
/* Create a WC. Set *WC_ABSPATH to its path. */