subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1535601 - /subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
Date Fri, 25 Oct 2013 01:06:38 GMT
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>.



Mime
View raw message