summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java b/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java
index efeaacf225b..82306276617 100644
--- a/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java
+++ b/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java
@@ -28,7 +28,7 @@ public class JRTConnectionPool implements ConnectionPool {
private static final Logger log = Logger.getLogger(JRTConnectionPool.class.getName());
- private final Supervisor supervisor = new Supervisor(new Transport());
+ private final Supervisor supervisor;
private final Map<String, JRTConnection> connections = new LinkedHashMap<>();
// The config sources used by this connection pool.
@@ -38,6 +38,11 @@ public class JRTConnectionPool implements ConnectionPool {
private volatile JRTConnection currentConnection;
public JRTConnectionPool(ConfigSourceSet sourceSet) {
+ this(new Supervisor(new Transport()), sourceSet);
+ }
+
+ public JRTConnectionPool(Supervisor supervisor, ConfigSourceSet sourceSet) {
+ this.supervisor = supervisor;
addSources(sourceSet);
}