org.alfresco.repo.replication
Class ReplicationServiceIntegrationTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.repo.replication.ReplicationServiceIntegrationTest
All Implemented Interfaces:
junit.framework.Test

public class ReplicationServiceIntegrationTest
extends junit.framework.TestCase

Unit tests for the Replication Service. Handles its own transactions, as in a few cases it needs to run async actions and know how they'll behave


Constructor Summary
ReplicationServiceIntegrationTest()
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testBasicExecution()
          Test that the action service can find the executor for us, and that it has everything it needs
 void testCreateSaveLoad()
           
 void testCreation()
           
 void testDeletion()
          Ensures that deletion works correctly
 void testEditing()
          Ensures that we can create, save, edit, save load, edit, save, load etc, all without problems, and without creating duplicates
 void testExecutionResult()
          Test that when we execute a replication task, the right stuff ends up being moved for us
 void testJavascriptAPI()
           
 void testLoadByTarget()
           
 void testLoadList()
           
 void testRenaming()
          Tests that we can rename definitions
 void testReplicationExecutionCancelling()
          Check that cancelling works.
 void testReplicationExecutionLocking()
          Check that the locking works.
 void testReplicationPayloadExpansion()
          Test that we turn a list of payload node starting points into the correct set of nodes to pass to the transfer service.
 void testScheduling()
          Test that the schedule related parts work properly
 void testTransferDefinitionBuilding()
          Test that we turn a replication definition correctly into a transfer definition
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReplicationServiceIntegrationTest

public ReplicationServiceIntegrationTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

testCreation

public void testCreation()
                  throws java.lang.Exception
Throws:
java.lang.Exception

testCreateSaveLoad

public void testCreateSaveLoad()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testLoadList

public void testLoadList()
                  throws java.lang.Exception
Throws:
java.lang.Exception

testLoadByTarget

public void testLoadByTarget()
                      throws java.lang.Exception
Throws:
java.lang.Exception

testDeletion

public void testDeletion()
                  throws java.lang.Exception
Ensures that deletion works correctly

Throws:
java.lang.Exception

testEditing

public void testEditing()
                 throws java.lang.Exception
Ensures that we can create, save, edit, save load, edit, save, load etc, all without problems, and without creating duplicates

Throws:
java.lang.Exception

testRenaming

public void testRenaming()
                  throws java.lang.Exception
Tests that we can rename definitions

Throws:
java.lang.Exception

testBasicExecution

public void testBasicExecution()
                        throws java.lang.Exception
Test that the action service can find the executor for us, and that it has everything it needs

Throws:
java.lang.Exception

testReplicationExecutionLocking

public void testReplicationExecutionLocking()
                                     throws java.lang.Exception
Check that the locking works. Take a 10 second lock on the job, then execute. Ensure that we really wait a little over 10 seconds.

Throws:
java.lang.Exception

testReplicationExecutionCancelling

public void testReplicationExecutionCancelling()
                                        throws java.lang.Exception
Check that cancelling works. Does this by taking a lock on the job, cancelling, releasing and seeing it abort. Tests that when we ask for a replication task to be cancelled, that it starts, cancels, and the status is correctly recorded for it.

Throws:
java.lang.Exception

testExecutionResult

public void testExecutionResult()
                         throws java.lang.Exception
Test that when we execute a replication task, the right stuff ends up being moved for us

Throws:
java.lang.Exception

testReplicationPayloadExpansion

public void testReplicationPayloadExpansion()
                                     throws java.lang.Exception
Test that we turn a list of payload node starting points into the correct set of nodes to pass to the transfer service.

Throws:
java.lang.Exception

testTransferDefinitionBuilding

public void testTransferDefinitionBuilding()
                                    throws java.lang.Exception
Test that we turn a replication definition correctly into a transfer definition

Throws:
java.lang.Exception

testScheduling

public void testScheduling()
                    throws java.lang.Exception
Test that the schedule related parts work properly

Throws:
java.lang.Exception

testJavascriptAPI

public void testJavascriptAPI()
                       throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.