You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/10/25 03:06:38 UTC

svn commit: r1535601 - /subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java

Author: brane
Date: Fri Oct 25 01:06:37 2013
New Revision: 1535601

URL: http://svn.apache.org/r1535601
Log:
Added a (currently disabled) test to JavaHL that tickles a bug that causes
an ArrayIndexOutOfBounds exception in ISVNClient.commit.
The bug exists on trunk but not in 1.8.x.

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
  (BasicTests.testCommitPartialMove): New test case; mostly disabled.

Modified:
    subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java

Modified: subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1535601&r1=1535600&r2=1535601&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Fri Oct 25 01:06:37 2013
@@ -1058,6 +1058,37 @@ public class BasicTests extends SVNTests
     }
 
     /**
+     * Check that half a move cannot be committed.
+     * @since 1.9
+     */
+    public void testCommitPartialMove() throws Throwable
+    {
+        OneTest thisTest = new OneTest();
+//        String root = thisTest.getWorkingCopy().getAbsolutePath();
+//        ClientException caught = null;
+//
+//        Set<String> srcPaths = new HashSet<String>(1);
+//        srcPaths.add(root + "/A/B/E/alpha");
+//        client.move(srcPaths, root + "/moved-alpha",
+//                    false, false, false, false, false, null, null, null);
+//
+//        try {
+//            client.commit(srcPaths, Depth.infinity, false, false, null, null,
+//                          new ConstMsg("Commit half of a move"), null);
+//        } catch (ClientException ex) {
+//            caught = ex;
+//        }
+//
+//        assertNotNull("Commit of partial move did not fail", caught);
+//
+//        List<ClientException.ErrorMessage> msgs = caught.getAllMessages();
+//        System.err.println(caught.getMessage());
+//        assertTrue(msgs.size() >= 2);
+//        assertTrue(msgs.get(0).getMessage().startsWith("Commit failed"));
+//        assertTrue(msgs.get(0).getMessage().startsWith("Cannot commit"));
+    }
+
+    /**
      * Assert that the first merge source suggested for
      * <code>destPath</code> at {@link Revision#WORKING} and {@link
      * Revision#HEAD} is equivalent to <code>expectedSrc</code>.