org.apache.sling.performance

## Class AbstractRepositoryTest

- java.lang.Object
- - org.apache.sling.performance.AbstractRepositoryTest

All Implemented Interfaces:
  IdentifiableTestClass

    public abstract class AbstractRepositoryTest
    extends Object
    implements IdentifiableTestClass

### Field Summary

Fields
`protected javax.jcr.Session` `session`
`protected String` `testInstanceName`
`protected javax.jcr.Node` `testRoot`

### Constructor Summary

Constructors
Constructor and Description
`AbstractRepositoryTest(String testInstanceName)`

### Method Summary

Methods
`protected org.apache.sling.jcr.api.SlingRepository` `getRepository()` Return a Repository - first call initializes it, and a JVM shutdown hook is registered to stop it
`protected javax.jcr.Session` `getSession()` Return a JCR Session, initialized on demand
`protected javax.jcr.Node` `getTestRootNode()` Return a test root node, created on demand, with a unique path
`String` `testClassName()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### testInstanceName

    protected String testInstanceName

#### session

    protected javax.jcr.Session session

#### testRoot

    protected javax.jcr.Node testRoot

### Constructor Detail

#### AbstractRepositoryTest

    public AbstractRepositoryTest(String testInstanceName)

### Method Detail

#### getRepository

    protected org.apache.sling.jcr.api.SlingRepository getRepository()
                                                              throws javax.jcr.RepositoryException,
                                                                     NamingException

Return a Repository - first call initializes it, and a JVM shutdown hook is registered to stop it

Throws:
  `javax.jcr.RepositoryException`
  `NamingException`

#### getSession

    protected javax.jcr.Session getSession()
                                    throws javax.jcr.RepositoryException,
                                           NamingException

Return a JCR Session, initialized on demand

Throws:
  `javax.jcr.RepositoryException`
  `NamingException`

#### getTestRootNode

    protected javax.jcr.Node getTestRootNode()
                                      throws javax.jcr.RepositoryException,
                                             NamingException

Return a test root node, created on demand, with a unique path

Throws:
  `javax.jcr.RepositoryException`
  `NamingException`

#### testClassName

    public String testClassName()

Specified by:
  `testClassName` in interface `IdentifiableTestClass`