org.olat.repository
Class RepositoryManagerTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.olat.core.test.OlatTestCase
              extended by org.olat.repository.RepositoryManagerTest
All Implemented Interfaces:
junit.framework.Test

public class RepositoryManagerTest
extends OlatTestCase

Initial Date: Mar 26, 2004

Author:
gnaegi Comment:

Constructor Summary
RepositoryManagerTest(java.lang.String arg0)
           
 
Method Summary
 void setUp()
           
static junit.framework.Test suite()
           
 void tearDown()
           
 void testConcurrentIncrementLaunchCounter()
           
 void testConcurrentIncrementLaunchCounterWithCodePoints()
          Modify a repository-entry from three thread to check if the exception does not pop up.
 void testCountByTypeLimitAccess()
           
 void testIncrementDownloadCounter()
           
 void testIncrementLaunchCounter()
           
 void testIncrementLaunchCounterSetDescription()
          Compare async increment-call with sync 'setDscription' call.
 void testQueryReferencableResourcesLimitType()
           
 void testRawRepositoryEntryCreate()
          Test creation of a repository entry.
 void testSetLastUsageNowFor()
          Test synchronization between same RepositoryEntry and setLastUsageNowFor, incrementLaunchCounter and incrementDownloadCounter.
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RepositoryManagerTest

public RepositoryManagerTest(java.lang.String arg0)
Parameters:
arg0 -
Method Detail

setUp

public void setUp()
Overrides:
setUp in class junit.framework.TestCase
See Also:
TestCase.setUp()

tearDown

public void tearDown()
Overrides:
tearDown in class junit.framework.TestCase
See Also:
TestCase.tearDown()

testRawRepositoryEntryCreate

public void testRawRepositoryEntryCreate()
Test creation of a repository entry.


testQueryReferencableResourcesLimitType

public void testQueryReferencableResourcesLimitType()

testCountByTypeLimitAccess

public void testCountByTypeLimitAccess()

testIncrementLaunchCounter

public void testIncrementLaunchCounter()

testIncrementDownloadCounter

public void testIncrementDownloadCounter()

testSetLastUsageNowFor

public void testSetLastUsageNowFor()
Test synchronization between same RepositoryEntry and setLastUsageNowFor, incrementLaunchCounter and incrementDownloadCounter. This test starts 4 threads : 2 to call setLastUsageNowFor, 1 to call incrementLaunchCounter 1 to call incrementDownloadCounter Breakpoint is set for 'setLastUsageNowFor', all other calls must wait.


testConcurrentIncrementLaunchCounter

public void testConcurrentIncrementLaunchCounter()

testIncrementLaunchCounterSetDescription

public void testIncrementLaunchCounterSetDescription()
Compare async increment-call with sync 'setDscription' call.


testConcurrentIncrementLaunchCounterWithCodePoints

public void testConcurrentIncrementLaunchCounterWithCodePoints()
Modify a repository-entry from three thread to check if the exception does not pop up. Thread 1 : call incrementDownloadCounter after 100ms Thread 2 : call incrementDownloadCounter after 300ms Thread 3 : update access-value on repository-entry directly after 200ms Codepoint-breakpoint at IncrementDownloadCounterBackgroundTask in executeTask before update


suite

public static junit.framework.Test suite()
                                  throws java.lang.Exception
Throws:
java.lang.Exception