subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1659536 - /subversion/trunk/subversion/tests/cmdline/lock_tests.py
Date Fri, 13 Feb 2015 12:30:52 GMT
Author: stsp
Date: Fri Feb 13 12:30:51 2015
New Revision: 1659536

URL: http://svn.apache.org/r1659536
Log:
Add a new test showing a regression in commit over ra_serf where it fails
to delete a directory tree containing many locked files.

The client-side error is: Unexpected HTTP status 400 'Bad Request' on '<path>'
The server logs this line: request failed: error reading the headers 

The problem is reproducible with 1.8.10 but not with 1.8.9.
It was introduced on the 1.8.x branch in r1606976.

In this test, the commit only fails with a certain number of locked files in
the WC. 50 files doesn't have the problem, 60 triggers the problem for me.
Currently, the test is using 75 for good measure.

Further investigation is pending. Help from ra_serf experts is appreciated :)

* subversion/tests/cmdline/lock_tests.py
  (delete_dir_with_lots_of_locked_files): New test which XFails over DAV and
   passes over all other RA layers.

Modified:
    subversion/trunk/subversion/tests/cmdline/lock_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/lock_tests.py?rev=1659536&r1=1659535&r2=1659536&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/lock_tests.py Fri Feb 13 12:30:51 2015
@@ -2372,6 +2372,43 @@ def copy_dir_with_locked_file(sbox):
                                      'mv', A_url, AA2_url,
                                      '-m', '')
 
+@XFail(svntest.main.is_ra_type_dav)
+def delete_dir_with_lots_of_locked_files(sbox):
+  "delete a directory containing lots of locked files"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # A lot of paths.
+  nfiles = 75 # NOTE: test XPASSES with 50 files!!!
+  locked_paths = []
+  for i in range(nfiles):
+      locked_paths.append("A/locked_files/file-%i" % i)
+  
+  # Create files at these paths
+  os.mkdir(sbox.ospath("A/locked_files"))
+  for file_path in locked_paths:
+    svntest.main.file_write(sbox.ospath(file_path), "This is a file\n")
+  sbox.simple_add("A/locked_files")
+  sbox.simple_commit()
+  sbox.simple_update()
+
+  # lock all the files
+  for file_path in locked_paths:
+    svntest.actions.run_and_verify_svn(None, [], 'lock',
+                                       '--username', 'jrandom',
+                                       '-m', 'lock %s' % file_path,
+                                       sbox.ospath(file_path))
+  # Locally delete A
+  sbox.simple_rm("A")
+
+  # Commit the deletion
+  # XFAIL: As of 1.8.10, this commit fails with:
+  #  svn: E175002: Unexpected HTTP status 400 'Bad Request' on '<path>'
+  # and the following error in the httpd error log:
+  #  request failed: error reading the headers 
+  # This problem was introduced on the 1.8.x branch in r1606976.
+  sbox.simple_commit()
 
 ########################################################################
 # Run the tests
@@ -2438,6 +2475,7 @@ test_list = [ None,
               delete_locked_file_with_percent,
               lock_commit_bump,
               copy_dir_with_locked_file,
+              delete_dir_with_lots_of_locked_files,
             ]
 
 if __name__ == '__main__':



Mime
View raw message