org.apache.maven.index
Class ConcurrentUseTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.codehaus.plexus.PlexusTestCase
              extended by org.apache.maven.index.AbstractIndexCreatorHelper
                  extended by org.apache.maven.index.AbstractNexusIndexerTest
                      extended by org.apache.maven.index.ConcurrentUseTest
All Implemented Interfaces:
Test
Direct Known Subclasses:
ConcurrentUseWithMergedContextTest

public class ConcurrentUseTest
extends AbstractNexusIndexerTest


Nested Class Summary
static class ConcurrentUseTest.IndexUserThread
           
 
Field Summary
protected  File repo
           
static int THREAD_COUNT
           
 
Fields inherited from class org.apache.maven.index.AbstractNexusIndexerTest
context, indexDir, nexusIndexer
 
Fields inherited from class org.apache.maven.index.AbstractIndexCreatorHelper
DEFAULT_CREATORS, FULL_CREATORS, MIN_CREATORS
 
Constructor Summary
ConcurrentUseTest()
           
 
Method Summary
protected  void addToIndex(NexusIndexer nexusIndexer, IndexingContext indexingContext)
           
protected  ConcurrentUseTest.IndexUserThread createThread(ArtifactInfo ai)
           
protected  void deleteFromIndex(NexusIndexer nexusIndexer, IndexingContext indexingContext)
           
protected  void prepareNexusIndexer(NexusIndexer nexusIndexer)
           
protected  int readIndex(NexusIndexer nexusIndexer, IndexingContext indexingContext)
           
 void testConcurrency()
           
 
Methods inherited from class org.apache.maven.index.AbstractNexusIndexerTest
assertGroup, setUp, tearDown, unprepareNexusIndexer
 
Methods inherited from class org.apache.maven.index.AbstractIndexCreatorHelper
deleteDirectory, getDirectory, testDirectory
 
Methods inherited from class org.codehaus.plexus.PlexusTestCase
customizeComponentConfiguration, customizeContainerConfiguration, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getConfigurationName, getContainer, getCustomConfigurationName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, release, setupContainer
 
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
 

Field Detail

THREAD_COUNT

public static final int THREAD_COUNT
See Also:
Constant Field Values

repo

protected File repo
Constructor Detail

ConcurrentUseTest

public ConcurrentUseTest()
Method Detail

prepareNexusIndexer

protected void prepareNexusIndexer(NexusIndexer nexusIndexer)
                            throws Exception
Specified by:
prepareNexusIndexer in class AbstractNexusIndexerTest
Throws:
Exception

createThread

protected ConcurrentUseTest.IndexUserThread createThread(ArtifactInfo ai)

testConcurrency

public void testConcurrency()
                     throws Exception
Throws:
Exception

addToIndex

protected void addToIndex(NexusIndexer nexusIndexer,
                          IndexingContext indexingContext)
                   throws IOException
Throws:
IOException

deleteFromIndex

protected void deleteFromIndex(NexusIndexer nexusIndexer,
                               IndexingContext indexingContext)
                        throws IOException
Throws:
IOException

readIndex

protected int readIndex(NexusIndexer nexusIndexer,
                        IndexingContext indexingContext)
                 throws IOException
Throws:
IOException


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.