aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-repository-admin
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2019-09-14 15:15:31 +0200
committerMartin Stockhammer <martin_s@apache.org>2019-09-22 00:09:54 +0200
commitdf8da96f9869522b6fc1b9270927942550555b99 (patch)
tree40784d3b630b6eae89f085f06751a41821079075 /archiva-modules/archiva-base/archiva-repository-admin
parentd9d87966655ca4a82e9be780caf3f70b2bcdc853 (diff)
downloadarchiva-df8da96f9869522b6fc1b9270927942550555b99.tar.gz
archiva-df8da96f9869522b6fc1b9270927942550555b99.zip
Modifying repository registry behaviour
Diffstat (limited to 'archiva-modules/archiva-base/archiva-repository-admin')
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MavenIndexContextMock.java8
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/networkproxy/NetworkProxyAdminTest.java3
2 files changed, 10 insertions, 1 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MavenIndexContextMock.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MavenIndexContextMock.java
index 4b4528bc8..843df59fe 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MavenIndexContextMock.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MavenIndexContextMock.java
@@ -40,6 +40,7 @@ import java.util.Set;
*/
public class MavenIndexContextMock implements ArchivaIndexingContext {
+ private boolean open = true;
private IndexingContext delegate;
private Repository repository;
private FilesystemStorage filesystemStorage;
@@ -93,6 +94,7 @@ public class MavenIndexContextMock implements ArchivaIndexingContext {
@Override
public void close(boolean deleteFiles) throws IOException {
+ open = false;
try {
delegate.close(deleteFiles);
} catch (NoSuchFileException e) {
@@ -102,6 +104,7 @@ public class MavenIndexContextMock implements ArchivaIndexingContext {
@Override
public void close() throws IOException {
+ open = false;
try {
delegate.close(false);
} catch (NoSuchFileException e) {
@@ -110,6 +113,11 @@ public class MavenIndexContextMock implements ArchivaIndexingContext {
}
@Override
+ public boolean isOpen() {
+ return open;
+ }
+
+ @Override
public void purge() throws IOException {
delegate.purge();
}
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/networkproxy/NetworkProxyAdminTest.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/networkproxy/NetworkProxyAdminTest.java
index 21020d1e8..cf8f91bd3 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/networkproxy/NetworkProxyAdminTest.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/repository/networkproxy/NetworkProxyAdminTest.java
@@ -23,6 +23,7 @@ import org.apache.archiva.admin.model.beans.RemoteRepository;
import org.apache.archiva.admin.model.networkproxy.NetworkProxyAdmin;
import org.apache.archiva.admin.repository.AbstractRepositoryAdminTest;
import org.apache.archiva.metadata.model.facets.AuditEvent;
+import org.apache.commons.lang.StringUtils;
import org.junit.Test;
import javax.inject.Inject;
@@ -157,7 +158,7 @@ public class NetworkProxyAdminTest
remoteRepository = remoteRepositoryAdmin.getRemoteRepository( getRemoteRepository().getId() );
- assertNull( remoteRepository.getRemoteDownloadNetworkProxyId() );
+ assertTrue(StringUtils.isEmpty(remoteRepository.getRemoteDownloadNetworkProxyId()) );
remoteRepositoryAdmin.deleteRemoteRepository( getRemoteRepository().getId(), getFakeAuditInformation() );
}