aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-scheduler
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-scheduler
parentd9d87966655ca4a82e9be780caf3f70b2bcdc853 (diff)
downloadarchiva-df8da96f9869522b6fc1b9270927942550555b99.tar.gz
archiva-df8da96f9869522b6fc1b9270927942550555b99.zip
Modifying repository registry behaviour
Diffstat (limited to 'archiva-modules/archiva-scheduler')
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MavenIndexContextMock.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MavenIndexContextMock.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MavenIndexContextMock.java
index fa070a7d9..c8e2cd4f0 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MavenIndexContextMock.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/mock/MavenIndexContextMock.java
@@ -40,6 +40,8 @@ import java.util.Set;
*/
public class MavenIndexContextMock implements ArchivaIndexingContext {
+ private boolean open = true;
+
private IndexingContext delegate;
private Repository repository;
private FilesystemStorage filesystemStorage;
@@ -93,6 +95,7 @@ public class MavenIndexContextMock implements ArchivaIndexingContext {
@Override
public void close(boolean deleteFiles) throws IOException {
+ this.open = false;
try {
delegate.close(deleteFiles);
} catch (NoSuchFileException e) {
@@ -102,6 +105,7 @@ public class MavenIndexContextMock implements ArchivaIndexingContext {
@Override
public void close() throws IOException {
+ this.open = false;
try {
delegate.close(false);
} catch (NoSuchFileException e) {
@@ -110,6 +114,11 @@ public class MavenIndexContextMock implements ArchivaIndexingContext {
}
@Override
+ public boolean isOpen() {
+ return open;
+ }
+
+ @Override
public void purge() throws IOException {
delegate.purge();
}