You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2010/09/01 15:38:52 UTC
svn commit: r991534 -
/subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py
Author: philip
Date: Wed Sep 1 13:38:51 2010
New Revision: 991534
URL: http://svn.apache.org/viewvc?rev=991534&view=rev
Log:
Fix some transient authz failures when running the dav tests in parallel.
* subversion/tests/cmdline/svntest/sandbox.py
(Sandbox._set_name): Use an atomic operation to update the authz file.
Modified:
subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py
Modified: subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py?rev=991534&r1=991533&r2=991534&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py Wed Sep 1 13:38:51 2010
@@ -57,13 +57,15 @@ class Sandbox:
### TODO: Move this into to the build() method
# For dav tests we need a single authz file which must be present,
# so we recreate it each time a sandbox is created with some default
- # contents.
+ # contents, making sure that an empty file is never present
if self.repo_url.startswith("http"):
# this dir doesn't exist out of the box, so we may have to make it
if not os.path.exists(svntest.main.work_dir):
os.makedirs(svntest.main.work_dir)
self.authz_file = os.path.join(svntest.main.work_dir, "authz")
- open(self.authz_file, 'w').write("[/]\n* = rw\n")
+ tmp_authz_file = os.path.join(svntest.main.work_dir, "authz-" + self.name)
+ open(tmp_authz_file, 'w').write("[/]\n* = rw\n")
+ os.rename(tmp_authz_file, self.authz_file)
# For svnserve tests we have a per-repository authz file, and it
# doesn't need to be there in order for things to work, so we don't