Signed-off-by: olivier lamy <olamy@apache.org>MRM-1958
} | } | ||||
}; | }; | ||||
} | } | ||||
@Override | |||||
public void close() | |||||
{ | |||||
// no op | |||||
} | |||||
} | } |
<groupId>org.apache.maven.plugins</groupId> | <groupId>org.apache.maven.plugins</groupId> | ||||
<artifactId>maven-surefire-plugin</artifactId> | <artifactId>maven-surefire-plugin</artifactId> | ||||
<configuration> | <configuration> | ||||
<reuseForks>false</reuseForks> | |||||
<includes> | <includes> | ||||
<include>**/*Tests.java</include> | <include>**/*Tests.java</include> | ||||
<include>**/*Test.java</include> | <include>**/*Test.java</include> | ||||
</includes> | </includes> | ||||
<argLine>-Xms1024m -Xmx2048m -server -XX:MaxPermSize=256m @{jacocoproperty}</argLine> | |||||
<argLine>-Xms1024m -Xmx3072m -server -XX:MaxPermSize=256m @{jacocoproperty}</argLine> | |||||
<systemPropertyVariables> | <systemPropertyVariables> | ||||
<appserver.base>${project.build.directory}/appserver-base</appserver.base> | <appserver.base>${project.build.directory}/appserver-base</appserver.base> | ||||
<plexus.home>${project.build.directory}/appserver-base</plexus.home> | <plexus.home>${project.build.directory}/appserver-base</plexus.home> |
import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.StringUtils; | ||||
import org.apache.cxf.jaxrs.client.JAXRSClientFactory; | import org.apache.cxf.jaxrs.client.JAXRSClientFactory; | ||||
import org.apache.cxf.jaxrs.client.WebClient; | import org.apache.cxf.jaxrs.client.WebClient; | ||||
import org.junit.After; | |||||
import org.junit.Assume; | import org.junit.Assume; | ||||
import org.junit.Before; | import org.junit.Before; | ||||
import org.junit.BeforeClass; | import org.junit.BeforeClass; | ||||
// END SNIPPET: authz-header | // END SNIPPET: authz-header | ||||
@BeforeClass | @BeforeClass | ||||
public static void chekRepo() | public static void chekRepo() | ||||
{ | { | ||||
super.startServer(); | super.startServer(); | ||||
} | } | ||||
private void removeAppsubFolder( File appServerBase, String folder ) | private void removeAppsubFolder( File appServerBase, String folder ) | ||||
throws Exception | throws Exception | ||||
{ | { |
{ | { | ||||
return this; | return this; | ||||
} | } | ||||
@Override | |||||
public void close() | |||||
{ | |||||
// no op | |||||
} | |||||
} | } |
public interface RepositorySessionFactory | public interface RepositorySessionFactory | ||||
{ | { | ||||
RepositorySession createSession(); | RepositorySession createSession(); | ||||
void close(); | |||||
} | } |
return new RepositorySession( metadataRepository, metadataResolver ); | return new RepositorySession( metadataRepository, metadataResolver ); | ||||
} | } | ||||
@Override | |||||
public void close() | |||||
{ | |||||
cassandraArchivaManager.shutdown(); | |||||
} | |||||
} | } |
public class FileRepositorySessionFactory | public class FileRepositorySessionFactory | ||||
implements RepositorySessionFactory | implements RepositorySessionFactory | ||||
{ | { | ||||
/** | |||||
* | |||||
*/ | |||||
private Map<String, MetadataFacetFactory> metadataFacetFactories; | private Map<String, MetadataFacetFactory> metadataFacetFactories; | ||||
/** | |||||
* | |||||
*/ | |||||
@Inject | @Inject | ||||
@Named( value = "archivaConfiguration#default" ) | @Named( value = "archivaConfiguration#default" ) | ||||
private ArchivaConfiguration configuration; | private ArchivaConfiguration configuration; | ||||
/** | |||||
* | |||||
*/ | |||||
@Inject | @Inject | ||||
private MetadataResolver metadataResolver; | private MetadataResolver metadataResolver; | ||||
return new RepositorySession( metadataRepository, metadataResolver ); | return new RepositorySession( metadataRepository, metadataResolver ); | ||||
} | } | ||||
@Override | |||||
public void close() | |||||
{ | |||||
// no op | |||||
} | |||||
} | } |
<artifactId>lucene-analyzers-common</artifactId> | <artifactId>lucene-analyzers-common</artifactId> | ||||
<version>${lucene.version}</version> | <version>${lucene.version}</version> | ||||
</dependency> | </dependency> | ||||
<dependency> | |||||
<groupId>io.dropwizard.metrics</groupId> | |||||
<artifactId>metrics-core</artifactId> | |||||
<version>3.1.0</version> | |||||
</dependency> | |||||
</dependencies> | </dependencies> | ||||
<build> | <build> | ||||
<testResources> | <testResources> |
private FileStore fileStore; | private FileStore fileStore; | ||||
private NodeStore nodeStore; | |||||
private ExecutorService executorService; | private ExecutorService executorService; | ||||
public enum StoreType | public enum StoreType | ||||
throws IOException, InvalidFileStoreVersionException | throws IOException, InvalidFileStoreVersionException | ||||
{ | { | ||||
createExecutor(); | createExecutor(); | ||||
NodeStore nodeStore; | |||||
if ( SEGMENT_FILE_TYPE == storeType ) | if ( SEGMENT_FILE_TYPE == storeType ) | ||||
{ | { | ||||
fileStore = FileStoreBuilder.fileStoreBuilder( repositoryPath.toFile() ).build(); | fileStore = FileStoreBuilder.fileStoreBuilder( repositoryPath.toFile() ).build(); | ||||
nodeStore = SegmentNodeStoreBuilders.builder( fileStore ).build(); | |||||
nodeStore = SegmentNodeStoreBuilders.builder( fileStore ) // | |||||
.withStatisticsProvider( StatisticsProvider.NOOP ) // | |||||
.build(); | |||||
} | } | ||||
else if ( IN_MEMORY_TYPE == storeType ) | else if ( IN_MEMORY_TYPE == storeType ) | ||||
{ | { |
--> | --> | ||||
<configuration> | |||||
<configuration status="debug"> | |||||
<appenders> | <appenders> | ||||
<Console name="console" target="SYSTEM_OUT"> | <Console name="console" target="SYSTEM_OUT"> |
<surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile> | <surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile> | ||||
<lucene.version>4.10.4</lucene.version> | <lucene.version>4.10.4</lucene.version> | ||||
<jcr-oak.version>1.7.3</jcr-oak.version> | |||||
<jcr-oak.version>1.7.5</jcr-oak.version> | |||||
<jackrabbit.version>2.15.4</jackrabbit.version> | <jackrabbit.version>2.15.4</jackrabbit.version> | ||||
<cxf.version>3.0.3</cxf.version> | <cxf.version>3.0.3</cxf.version> |