You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@wandisco.com> on 2011/04/04 17:37:22 UTC

notification backward compatibilty of the testsuite

I've been working on a revert implementation that fixes some correctness
problems.  A side effect of this change is that the notifications
change.  In 1.6 revert only notifies for the root of an added tree, my
new code notifies for all the added nodes.  This causes 3 of the
regression tests to fail.  The 1.6 behaviour seems a bit arbitrary to
me, and reproducing it with my new code would be difficult.

Do we need any sort of backward compatibility in the testsuite?  Is it
acceptable to simply change the regression tests to expect the new
notifications?  Something like this:

Index: subversion/tests/cmdline/revert_tests.py
===================================================================
--- subversion/tests/cmdline/revert_tests.py	(revision 1088611)
+++ subversion/tests/cmdline/revert_tests.py	(working copy)
@@ -856,7 +856,8 @@
                                        dry_run = 0)
 
   # now test if the revert works ok
-  revert_paths = [G_path]
+  revert_paths = [G_path] + [os.path.join(G_path, child)
+                             for child in ['alpha', 'beta', 'pi', 'rho', 'tau']]
 
   expected_output = svntest.verify.UnorderedOutput([
     "Reverted '%s'\n" % path for path in revert_paths])
Index: subversion/tests/cmdline/schedule_tests.py
===================================================================
--- subversion/tests/cmdline/schedule_tests.py	(revision 1088611)
+++ subversion/tests/cmdline/schedule_tests.py	(working copy)
@@ -312,7 +312,13 @@
   X_path = sbox.ospath('X')
   Y_path = sbox.ospath('A/C/Y')
   Z_path = sbox.ospath('A/D/H/Z')
-  files = [X_path, Y_path, Z_path]
+  files = ([X_path, Y_path, Z_path]
+           + [os.path.join(X_path, child)
+              for child in ['P', 'delta']]
+           + [os.path.join(Y_path, child)
+              for child in ['Q', 'epsilon', 'upsilon']]
+           + [os.path.join(Z_path, child)
+              for child in ['R', 'zeta']])
 
   exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
                                                               'revert',
Index: subversion/tests/cmdline/depth_tests.py
===================================================================
--- subversion/tests/cmdline/depth_tests.py	(revision 1088611)
+++ subversion/tests/cmdline/depth_tests.py	(working copy)
@@ -2221,7 +2221,11 @@
   #verify_depth(None, "empty", LE_path)
 
   # revert A/L, with an excluded item in the tree
-  expected_output = ["Reverted '"+L_path+"'\n"]
+  revert_paths = [L_path] + [os.path.join(L_path, child)
+                             for child in ['E', 'F', 'lambda']]
+  expected_output = svntest.verify.UnorderedOutput([
+    "Reverted '%s'\n" % path for path in revert_paths])
+
   svntest.actions.run_and_verify_svn(None, expected_output, [],
                                      'revert', '--depth=infinity', L_path)
 

-- 
Philip

Re: notification backward compatibilty of the testsuite

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 04/04/2011 11:37 AM, Philip Martin wrote:
> I've been working on a revert implementation that fixes some correctness
> problems.  A side effect of this change is that the notifications
> change.  In 1.6 revert only notifies for the root of an added tree, my
> new code notifies for all the added nodes.  This causes 3 of the
> regression tests to fail.  The 1.6 behaviour seems a bit arbitrary to
> me, and reproducing it with my new code would be difficult.
> 
> Do we need any sort of backward compatibility in the testsuite?  Is it
> acceptable to simply change the regression tests to expect the new
> notifications?  Something like this:

The command-line test suite is designed and intended to be run only with the
same branch of the command-line tools as the test themselves, so this is an
acceptable change.  We do try (weakly) to allow our tests to be run against
different *server* versions (with to help in validating that we haven't
broken compatibility between client and server, but that's not what you're
talking about here.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


RE: notification backward compatibilty of the testsuite

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Philip Martin [mailto:philip.martin@wandisco.com]
> Sent: maandag 4 april 2011 17:37
> To: dev@subversion.apache.org
> Subject: notification backward compatibilty of the testsuite
> 
> I've been working on a revert implementation that fixes some correctness
> problems.  A side effect of this change is that the notifications
> change.  In 1.6 revert only notifies for the root of an added tree, my
> new code notifies for all the added nodes.  This causes 3 of the
> regression tests to fail.  The 1.6 behaviour seems a bit arbitrary to
> me, and reproducing it with my new code would be difficult.
> 
> Do we need any sort of backward compatibility in the testsuite?  Is it
> acceptable to simply change the regression tests to expect the new
> notifications?  Something like this:

I don't think we promise notifications to stay the same over versions and as
an application developer I prefer a bit more notifications. There are
several other places where we already changed notifications a few times
(merge, tree conflicts, etc. etc.)

+1 from me on just adding the extra notifications.

(I would have a problem if we removed notification calls for specific paths;
but not if they were just filtered in svn's output)

	Bert