Author: brane
Date: Wed Jan 15 16:31:03 2014
New Revision: 1558454
URL: http://svn.apache.org/r1558454
Log:
Fix a bug in the JavaHL RA reporter implementation, that caused it to spam
the envserve connection with spurious abort-report commands during normal
usage.
[in subversion/bindings/javahl]
* native/StateReporter.cpp
(StateReporter::finishReport, StateReporter::abortReport):
Invalidate the reporter after the finish-report or abort-report was
successful, so that a subsequent call to dispose doesn't send an
abort-report command again.
* tests/org/apache/subversion/javahl/SVNRemoteTests.java
(SVNRemoteTests.testSimpleStatus): Use the session after the reporter
has been disposed to make sure there are no invalid commands hanging
around in the command queue.
Modified:
subversion/trunk/subversion/bindings/javahl/native/StateReporter.cpp
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
Modified: subversion/trunk/subversion/bindings/javahl/native/StateReporter.cpp
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/StateReporter.cpp?rev=1558454&r1=1558453&r2=1558454&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/StateReporter.cpp
(original)
+++ subversion/trunk/subversion/bindings/javahl/native/StateReporter.cpp Wed
Jan 15 16:31:03 2014
@@ -160,6 +160,7 @@ StateReporter::finishReport()
SVN_JNI_ERR(m_raw_reporter->finish_report(m_report_baton,
subPool.getPool()),
SVN_INVALID_REVNUM);
+ m_valid = false;
return jlong(m_target_revision);
}
@@ -173,6 +174,7 @@ StateReporter::abortReport()
SVN::Pool subPool(pool);
SVN_JNI_ERR(m_raw_reporter->abort_report(m_report_baton,
subPool.getPool()),);
+ m_valid = false;
}
void
Modified:
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java?rev=1558454&r1=1558453&r2=1558454&view=diff
==============================================================================
---
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
(original)
+++
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
Wed Jan 15 16:31:03 2014
@@ -1141,6 +1141,7 @@ public class SVNRemoteTests extends SVNT
rp.dispose();
}
assertEquals(21, receiver.status.size());
+ session.checkPath("", Revision.SVN_INVALID_REVNUM);
}
public void testTextchangeStatus() throws Exception