aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web
diff options
context:
space:
mode:
authorMartin Stockhammer <martin.stockhammer@ars.de>2017-10-21 14:42:32 +0200
committerMartin Stockhammer <martin.stockhammer@ars.de>2017-10-21 14:42:32 +0200
commitcb38dbbbc6f50f8a7a12adaf0afc42fe2c089599 (patch)
treed0fc0cc3b27a6fb233b89eb1cf0e6d8c25b113a3 /archiva-modules/archiva-web
parent2c12980a3a0a893375f89cd1ac60b8051483a377 (diff)
downloadarchiva-cb38dbbbc6f50f8a7a12adaf0afc42fe2c089599.tar.gz
archiva-cb38dbbbc6f50f8a7a12adaf0afc42fe2c089599.zip
Changing the initialization behaviour of metadata repo factory
Diffstat (limited to 'archiva-modules/archiva-web')
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java3
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java10
2 files changed, 13 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java
index 82bd3602d..cc789e1fb 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/TestRepositorySessionFactoryBean.java
@@ -56,6 +56,9 @@ public class TestRepositorySessionFactoryBean
RepositorySessionFactory repositorySessionFactory =
getBeanFactory().getBean( "repositorySessionFactory#" + this.beanId, RepositorySessionFactory.class );
logger.info( "create RepositorySessionFactory instance of {}", repositorySessionFactory.getClass().getName() );
+ if (!repositorySessionFactory.isOpen()) {
+ repositorySessionFactory.open();
+ }
return repositorySessionFactory;
}
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java
index 31e5a299a..b2aab9de8 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestRepositorySessionFactory.java
@@ -37,6 +37,16 @@ public class TestRepositorySessionFactory
}
@Override
+ public void open() {
+
+ }
+
+ @Override
+ public boolean isOpen() {
+ return false;
+ }
+
+ @Override
public RepositorySession createSession()
{
return repositorySession != null ? repositorySession : new RepositorySession( new TestMetadataRepository(),