Project

General

Profile

Developer FAQ

The Maven FAQ is now found on a separate page.

Subversion

Aborted repository sync

If you aborted the syncing process prematurely and are getting this output:

Failed to get lock on destination repos, currently held by 'svn.example.com:0e4e0d98-631d-0410-9a00-9320a90920b3'
Failed to get lock on destination repos, currently held by 'svn.example.com:0e4e0d98-631d-0410-9a00-9320a90920b3'
Failed to get lock on destination repos, currently held by 'svn.example.com:0e4e0d98-631d-0410-9a00-9320a90920b3'
Failed to get lock on destination repos, currently held by 'svn.example.com:0e4e0d98-631d-0410-9a00-9320a90920b3'
Failed to get lock on destination repos, currently held by 'svn.example.com:0e4e0d98-631d-0410-9a00-9320a90920b3'
Failed to get lock on destination repos, currently held by 'svn.example.com:0e4e0d98-631d-0410-9a00-9320a90920b3'
Failed to get lock on destination repos, currently held by 'svn.example.com:0e4e0d98-631d-0410-9a00-9320a90920b3'
Failed to get lock on destination repos, currently held by 'svn.example.com:0e4e0d98-631d-0410-9a00-9320a90920b3'
Failed to get lock on destination repos, currently held by 'svn.example.com:0e4e0d98-631d-0410-9a00-9320a90920b3'
Failed to get lock on destination repos, currently held by 'svn.example.com:0e4e0d98-631d-0410-9a00-9320a90920b3'
svnsync: Couldn't get lock on destination repos after 10 attempts

Simply delete the lock by executing:

svn propdel svn:sync-lock --revprop -r 0 ${TOREPO}

Syncing two subversion repositories

Is explained in full detail here: http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.replication

maven clean test is running successful on computer (A) but fails non (B)

(See also IntegrationTestWriting)

with exactly the same source code mvn clean test is running successful on computer (A) but fails non (B). This is most probably due to dependencies between to tests which ideally should nor exist, but in reality you can encounter situations when test X running after test Y succeeds whereas Y running after test X fails. In this case quite often X leaves some test data in the database which is not cleaned up after the test class ends and which id not overwritten by new testdata. There are two mechanisms which are doing the cleanup:

  1. Test are usually rolled back after the tests ends. This is frequently overwritten for specific tests.

  2. tables contains in new test data files (@@Data@ annotations) will cause existing data to be dropped.

The CleanSweepInsertLoadStrategy can be used as a third, explicit mechanism which will clean sweep the whole data base except for the terms. If you are interested into also drop all terms please take a look into the source code of this class.

public class SomethingTestTest extends CdmTransactionalIntegrationTest {
    @Test
    @DataSet(loadStrategy=CleanSweepInsertLoadStrategy.class, value="SomethingTest.xml")
    @ExpectedDataSet(value="FirstDataInserterTest.testBlankDB-result.xml")
    public void testSomething() {

     ....

Add picture from clipboard (Maximum size: 40 MB)