sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomm...@apache.org
Subject svn commit: r1568311 - in /sling/trunk/contrib/extensions/replication/src: main/java/org/apache/sling/replication/agent/impl/ main/java/org/apache/sling/replication/transport/impl/ test/java/org/apache/sling/replication/agent/impl/
Date Fri, 14 Feb 2014 14:06:20 GMT
Author: tommaso
Date: Fri Feb 14 14:06:20 2014
New Revision: 1568311

URL: http://svn.apache.org/r1568311
Log:
SLING-3394 - fixed agent passive mode checks

Added:
    sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/transport/impl/NopTransportHandler.java
  (with props)
Modified:
    sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/agent/impl/ReplicationAgentServiceFactory.java
    sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/agent/impl/SimpleReplicationAgent.java
    sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/agent/impl/ReplicationAgentResourceProviderTest.java
    sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/agent/impl/SimpleReplicationAgentTest.java

Modified: sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/agent/impl/ReplicationAgentServiceFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/agent/impl/ReplicationAgentServiceFactory.java?rev=1568311&r1=1568310&r2=1568311&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/agent/impl/ReplicationAgentServiceFactory.java
(original)
+++ sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/agent/impl/ReplicationAgentServiceFactory.java
Fri Feb 14 14:06:20 2014
@@ -33,6 +33,7 @@ import org.apache.sling.commons.osgi.Pro
 import org.apache.sling.replication.agent.AgentConfigurationException;
 import org.apache.sling.replication.agent.ReplicationAgent;
 import org.apache.sling.replication.agent.ReplicationAgentConfiguration;
+import org.apache.sling.replication.event.ReplicationEventFactory;
 import org.apache.sling.replication.queue.ReplicationQueueDistributionStrategy;
 import org.apache.sling.replication.queue.ReplicationQueueProvider;
 import org.apache.sling.replication.queue.impl.SingleQueueDistributionStrategy;
@@ -41,6 +42,7 @@ import org.apache.sling.replication.rule
 import org.apache.sling.replication.serialization.ReplicationPackageBuilder;
 import org.apache.sling.replication.serialization.impl.vlt.FileVaultReplicationPackageBuilder;
 import org.apache.sling.replication.transport.TransportHandler;
+import org.apache.sling.replication.transport.impl.NopTransportHandler;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.ServiceRegistration;
@@ -93,8 +95,8 @@ public class ReplicationAgentServiceFact
     @Property(boolValue = true)
     private static final String USE_AGGREGATE_PATHS = ReplicationAgentConfiguration.USE_AGGREGATE_PATHS;
 
-    @Property(name = TRANSPORT)
-    @Reference(name = "TransportHandler", policy = ReferencePolicy.DYNAMIC)
+    @Property(name = TRANSPORT, value = "(name=" + NopTransportHandler.NAME + ")")
+    @Reference(name = "TransportHandler", target = "(name=" + NopTransportHandler.NAME +
")", policy = ReferencePolicy.DYNAMIC)
     private TransportHandler transportHandler;
 
     @Property(name = PACKAGING, value = DEFAULT_PACKAGING)
@@ -116,6 +118,9 @@ public class ReplicationAgentServiceFact
     @Reference
     private ReplicationRuleEngine replicationRuleEngine;
 
+    @Reference
+    private ReplicationEventFactory replicationEventFactory;
+
     @Activate
     public void activate(BundleContext context, Map<String, ?> config) throws Exception
{
 
@@ -142,7 +147,6 @@ public class ReplicationAgentServiceFact
             String distribution = PropertiesUtil.toString(config.get(QUEUE_DISTRIBUTION),
"");
             props.put(QUEUE_DISTRIBUTION, distribution);
 
-
             String[] rules = PropertiesUtil.toStringArray(config.get(RULES), new String[0]);
             props.put(RULES, rules);
 
@@ -162,7 +166,7 @@ public class ReplicationAgentServiceFact
             }
 
             ReplicationAgent agent = new SimpleReplicationAgent(name, rules, useAggregatePaths,
-                    transportHandler, packageBuilder, queueProvider, queueDistributionStrategy,
replicationRuleEngine);
+                    transportHandler, packageBuilder, queueProvider, queueDistributionStrategy,
replicationEventFactory, replicationRuleEngine);
 
             // register agent service
             agentReg = context.registerService(ReplicationAgent.class.getName(), agent, props);

Modified: sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/agent/impl/SimpleReplicationAgent.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/agent/impl/SimpleReplicationAgent.java?rev=1568311&r1=1568310&r2=1568311&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/agent/impl/SimpleReplicationAgent.java
(original)
+++ sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/agent/impl/SimpleReplicationAgent.java
Fri Feb 14 14:06:20 2014
@@ -18,24 +18,33 @@
  */
 package org.apache.sling.replication.agent.impl;
 
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.List;
+import java.util.Properties;
 import org.apache.sling.replication.agent.AgentReplicationException;
 import org.apache.sling.replication.agent.ReplicationAgent;
 import org.apache.sling.replication.communication.ReplicationRequest;
 import org.apache.sling.replication.communication.ReplicationResponse;
-import org.apache.sling.replication.queue.*;
+import org.apache.sling.replication.event.ReplicationEventFactory;
+import org.apache.sling.replication.event.ReplicationEventType;
+import org.apache.sling.replication.queue.ReplicationQueue;
+import org.apache.sling.replication.queue.ReplicationQueueDistributionStrategy;
+import org.apache.sling.replication.queue.ReplicationQueueException;
+import org.apache.sling.replication.queue.ReplicationQueueItem;
+import org.apache.sling.replication.queue.ReplicationQueueItemState;
+import org.apache.sling.replication.queue.ReplicationQueueProcessor;
+import org.apache.sling.replication.queue.ReplicationQueueProvider;
 import org.apache.sling.replication.rule.ReplicationRuleEngine;
 import org.apache.sling.replication.serialization.ReplicationPackage;
 import org.apache.sling.replication.serialization.ReplicationPackageBuilder;
 import org.apache.sling.replication.serialization.ReplicationPackageBuildingException;
-import org.apache.sling.replication.queue.ReplicationQueueItem;
 import org.apache.sling.replication.transport.ReplicationTransportException;
 import org.apache.sling.replication.transport.TransportHandler;
+import org.apache.sling.replication.transport.impl.NopTransportHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * Basic implementation of a {@link ReplicationAgent}
  */
@@ -51,13 +60,14 @@ public class SimpleReplicationAgent impl
 
     private final ReplicationQueueDistributionStrategy queueDistributionStrategy;
 
+    private final ReplicationEventFactory replicationEventFactory;
+
     private final String name;
 
     private final String[] rules;
 
-    String endpoint;
-
     private final boolean useAggregatePaths;
+
     private final ReplicationRuleEngine ruleEngine;
 
     public SimpleReplicationAgent(String name, String[] rules,
@@ -66,7 +76,7 @@ public class SimpleReplicationAgent impl
                                   ReplicationPackageBuilder packageBuilder,
                                   ReplicationQueueProvider queueProvider,
                                   ReplicationQueueDistributionStrategy queueDistributionHandler,
-                                  ReplicationRuleEngine ruleEngine) {
+                                  ReplicationEventFactory replicationEventFactory, ReplicationRuleEngine
ruleEngine) {
         this.name = name;
         this.rules = rules;
         this.transportHandler = transportHandler;
@@ -74,6 +84,7 @@ public class SimpleReplicationAgent impl
         this.queueProvider = queueProvider;
         this.queueDistributionStrategy = queueDistributionHandler;
         this.useAggregatePaths = useAggregatePaths;
+        this.replicationEventFactory = replicationEventFactory;
         this.ruleEngine = ruleEngine;
     }
 
@@ -94,7 +105,7 @@ public class SimpleReplicationAgent impl
     }
 
     public boolean isPassive() {
-        return transportHandler == null; // TODO : improve this
+        return transportHandler == null || transportHandler instanceof NopTransportHandler;
// TODO : improve this
     }
 
 
@@ -114,12 +125,11 @@ public class SimpleReplicationAgent impl
 
         List<ReplicationPackage> packages = new ArrayList<ReplicationPackage>();
 
-        if(useAggregatePaths){
+        if (useAggregatePaths) {
             ReplicationPackage replicationPackage = buildPackage(replicationRequest);
             packages.add(replicationPackage);
-        }
-        else {
-            for (String path : replicationRequest.getPaths()){
+        } else {
+            for (String path : replicationRequest.getPaths()) {
                 ReplicationPackage replicationPackage = buildPackage(new ReplicationRequest(replicationRequest.getTime(),
                         replicationRequest.getAction(),
                         path));
@@ -135,7 +145,7 @@ public class SimpleReplicationAgent impl
     private ReplicationResponse schedule(ReplicationPackage[] packages, boolean offer) throws
AgentReplicationException {
         ReplicationResponse replicationResponse = new ReplicationResponse();
 
-        for (ReplicationPackage replicationPackage : packages){
+        for (ReplicationPackage replicationPackage : packages) {
             ReplicationResponse currentReplicationResponse = schedule(replicationPackage,
offer);
 
             replicationResponse.setSuccessful(currentReplicationResponse.isSuccessful());
@@ -152,20 +162,24 @@ public class SimpleReplicationAgent impl
                 replicationPackage.getAction(),
                 replicationPackage.getType());
 
-        if(offer){
+        if (offer) {
             try {
-
                 queueDistributionStrategy.offer(replicationQueueItem, this, queueProvider);
+                if (isPassive()) {
+                    generatePackageQueuedEvent(replicationQueueItem);
+                }
             } catch (ReplicationQueueException e) {
                 replicationResponse.setSuccessful(false);
                 throw new AgentReplicationException(e);
             }
-        }
-        else {
+        } else {
             // send the replication package to the queue distribution handler
             try {
                 ReplicationQueueItemState state = queueDistributionStrategy.add(replicationQueueItem,
                         this, queueProvider);
+                if (isPassive()) {
+                    generatePackageQueuedEvent(replicationQueueItem);
+                }
                 if (state != null) {
                     replicationResponse.setStatus(state.getItemState().toString());
                     replicationResponse.setSuccessful(state.isSuccessful());
@@ -183,21 +197,24 @@ public class SimpleReplicationAgent impl
         return replicationResponse;
     }
 
-    public boolean process(ReplicationQueueItem itemInfo)  {
+    private void generatePackageQueuedEvent(ReplicationQueueItem replicationQueueItem) {
+        Dictionary<Object, Object> properties = new Properties();
+        properties.put("replication.package.paths", replicationQueueItem.getPaths());
+        properties.put("replication.agent.name", name);
+        replicationEventFactory.generateEvent(ReplicationEventType.PACKAGE_QUEUED, properties);
+    }
+
+    public boolean process(ReplicationQueueItem itemInfo) {
         try {
             ReplicationPackage replicationPackage = packageBuilder.getPackage(itemInfo.getId());
 
-            if(replicationPackage == null){
+            if (replicationPackage == null || transportHandler == null) {
+                log.info("agent {} processing skipped", name);
                 return false;
-            }
-
-            if (transportHandler != null) {
+            } else {
                 transportHandler.transport(replicationPackage);
                 replicationPackage.delete();
                 return true;
-            } else {
-                log.info("agent {} processing skipped", name);
-                return false;
             }
 
         } catch (ReplicationTransportException e) {
@@ -207,15 +224,18 @@ public class SimpleReplicationAgent impl
     }
 
     public ReplicationPackage removeHead(String queueName) throws ReplicationQueueException
{
-        if(isPassive()) return null;
-
-        ReplicationQueue queue = getQueue(queueName);
-        ReplicationQueueItem info = queue.getHead();
-        if(info == null) return null;
-
-        queue.removeHead();
-
-        return packageBuilder.getPackage(info.getId());
+        ReplicationPackage replicationPackage = null;
+        if (isPassive()) {
+            ReplicationQueue queue = getQueue(queueName);
+            ReplicationQueueItem info = queue.getHead();
+            if (info != null) {
+                queue.removeHead();
+                replicationPackage = packageBuilder.getPackage(info.getId());
+            }
+            return replicationPackage;
+        } else {
+            throw new ReplicationQueueException("cannot explicitly fetch items from not-passive
agents");
+        }
     }
 
     public String getName() {
@@ -239,15 +259,16 @@ public class SimpleReplicationAgent impl
             ruleEngine.applyRules(this, rules);
         }
 
-        if(!isPassive())
-            queueProvider.enableQueueProcessing(this, this);    }
+        if (!isPassive())
+            queueProvider.enableQueueProcessing(this, this);
+    }
 
     public void disable() {
         if (rules != null) {
             ruleEngine.unapplyRules(this, rules);
         }
 
-        if(!isPassive())
+        if (!isPassive())
             queueProvider.disableQueueProcessing(this);
     }
 

Added: sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/transport/impl/NopTransportHandler.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/transport/impl/NopTransportHandler.java?rev=1568311&view=auto
==============================================================================
--- sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/transport/impl/NopTransportHandler.java
(added)
+++ sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/transport/impl/NopTransportHandler.java
Fri Feb 14 14:06:20 2014
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.replication.transport.impl;
+
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
+import org.apache.sling.replication.serialization.ReplicationPackage;
+import org.apache.sling.replication.transport.ReplicationTransportException;
+import org.apache.sling.replication.transport.TransportHandler;
+
+/**
+ * A no-operation {@link org.apache.sling.replication.transport.TransportHandler}
+ */
+@Component(metatype = false)
+@Service(value = TransportHandler.class)
+@Property(name = "name", value = NopTransportHandler.NAME)
+public class NopTransportHandler implements TransportHandler {
+    public static final String NAME = "nop";
+
+    public void transport(ReplicationPackage replicationPackage) throws ReplicationTransportException
{
+
+    }
+}

Propchange: sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/transport/impl/NopTransportHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/agent/impl/ReplicationAgentResourceProviderTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/agent/impl/ReplicationAgentResourceProviderTest.java?rev=1568311&r1=1568310&r2=1568311&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/agent/impl/ReplicationAgentResourceProviderTest.java
(original)
+++ sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/agent/impl/ReplicationAgentResourceProviderTest.java
Fri Feb 14 14:06:20 2014
@@ -90,7 +90,7 @@ public class ReplicationAgentResourcePro
         when(context.getServiceReferences(ReplicationAgent.class.getName(), filter)).thenReturn(
                         agentServiceReferences);
         SimpleReplicationAgent replicationAgent = new SimpleReplicationAgent(path, null,
true,
-                        null, null, null, null, null);
+                        null, null, null, null, null, null);
         when(context.getService(serviceReference)).thenReturn(replicationAgent);
         return replicationAgent;
     }

Modified: sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/agent/impl/SimpleReplicationAgentTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/agent/impl/SimpleReplicationAgentTest.java?rev=1568311&r1=1568310&r2=1568311&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/agent/impl/SimpleReplicationAgentTest.java
(original)
+++ sling/trunk/contrib/extensions/replication/src/test/java/org/apache/sling/replication/agent/impl/SimpleReplicationAgentTest.java
Fri Feb 14 14:06:20 2014
@@ -21,6 +21,7 @@ package org.apache.sling.replication.age
 import org.apache.sling.replication.communication.ReplicationActionType;
 import org.apache.sling.replication.communication.ReplicationRequest;
 import org.apache.sling.replication.communication.ReplicationResponse;
+import org.apache.sling.replication.event.ReplicationEventFactory;
 import org.apache.sling.replication.queue.ReplicationQueue;
 import org.apache.sling.replication.queue.ReplicationQueueDistributionStrategy;
 import org.apache.sling.replication.queue.ReplicationQueueItem;
@@ -56,7 +57,7 @@ public class SimpleReplicationAgentTest 
         ReplicationQueueProvider queueProvider = mock(ReplicationQueueProvider.class);
         ReplicationQueueDistributionStrategy distributionHandler = mock(ReplicationQueueDistributionStrategy.class);
         SimpleReplicationAgent agent = new SimpleReplicationAgent(name, new String[0], true,
-                        transportHandler, packageBuilder, queueProvider, distributionHandler,
null);
+                        transportHandler, packageBuilder, queueProvider, distributionHandler,
null, null);
         ReplicationQueueItem item = mock(ReplicationQueueItem.class);
         assertTrue(agent.process(item));
     }
@@ -68,11 +69,13 @@ public class SimpleReplicationAgentTest 
         ReplicationPackageBuilder packageBuilder = mock(ReplicationPackageBuilder.class);
         ReplicationQueueProvider queueProvider = mock(ReplicationQueueProvider.class);
         ReplicationQueueDistributionStrategy distributionHandler = mock(ReplicationQueueDistributionStrategy.class);
+        ReplicationEventFactory replicationEventFactory = mock(ReplicationEventFactory.class);
         SimpleReplicationAgent agent = new SimpleReplicationAgent(name, new String[0], true,
-                        transportHandler, packageBuilder, queueProvider, distributionHandler,
null);
+                        transportHandler, packageBuilder, queueProvider, distributionHandler,
replicationEventFactory, null);
         ReplicationRequest request = new ReplicationRequest(System.nanoTime(),
                         ReplicationActionType.ADD, "/");
         ReplicationPackage replicationPackage = mock(ReplicationPackage.class);
+        when(replicationPackage.getPaths()).thenReturn(new String[]{"/"});
         when(packageBuilder.createPackage(request)).thenReturn(replicationPackage);
         when(queueProvider.getDefaultQueue(agent)).thenReturn(
               new SimpleReplicationQueue(agent, "name"));
@@ -88,11 +91,13 @@ public class SimpleReplicationAgentTest 
         ReplicationPackageBuilder packageBuilder = mock(ReplicationPackageBuilder.class);
         ReplicationQueueProvider queueProvider = mock(ReplicationQueueProvider.class);
         ReplicationQueueDistributionStrategy distributionHandler = mock(ReplicationQueueDistributionStrategy.class);
+        ReplicationEventFactory replicationEventFactory = mock(ReplicationEventFactory.class);
         SimpleReplicationAgent agent = new SimpleReplicationAgent(name, new String[0], true,
-                transportHandler, packageBuilder, queueProvider, distributionHandler, null);
+                transportHandler, packageBuilder, queueProvider, distributionHandler, replicationEventFactory,
null);
         ReplicationRequest request = new ReplicationRequest(System.nanoTime(),
                 ReplicationActionType.ADD, "/");
         ReplicationPackage replicationPackage = mock(ReplicationPackage.class);
+        when(replicationPackage.getPaths()).thenReturn(new String[]{"/"});
         ReplicationQueueItemState state = new ReplicationQueueItemState();
         state.setItemState(ReplicationQueueItemState.ItemState.SUCCEEDED);
         when(distributionHandler.add(any(ReplicationQueueItem.class), eq(agent), eq(queueProvider))).thenReturn(state);
@@ -111,11 +116,13 @@ public class SimpleReplicationAgentTest 
         ReplicationPackageBuilder packageBuilder = mock(ReplicationPackageBuilder.class);
         ReplicationQueueProvider queueProvider = mock(ReplicationQueueProvider.class);
         ReplicationQueueDistributionStrategy distributionHandler = mock(ReplicationQueueDistributionStrategy.class);
+        ReplicationEventFactory replicationEventFactory = mock(ReplicationEventFactory.class);
         SimpleReplicationAgent agent = new SimpleReplicationAgent(name, new String[0], true,
-                transportHandler, packageBuilder, queueProvider, distributionHandler, null);
+                transportHandler, packageBuilder, queueProvider, distributionHandler, replicationEventFactory,
null);
         ReplicationRequest request = new ReplicationRequest(System.nanoTime(),
                 ReplicationActionType.ADD, "/");
         ReplicationPackage replicationPackage = mock(ReplicationPackage.class);
+        when(replicationPackage.getPaths()).thenReturn(new String[]{"/"});
         when(packageBuilder.createPackage(request)).thenReturn(replicationPackage);
         when(queueProvider.getDefaultQueue(agent)).thenReturn(
                 new SimpleReplicationQueue(agent, "name"));
@@ -130,7 +137,7 @@ public class SimpleReplicationAgentTest 
         ReplicationQueueProvider queueProvider = mock(ReplicationQueueProvider.class);
         ReplicationQueueDistributionStrategy distributionHandler = mock(ReplicationQueueDistributionStrategy.class);
         SimpleReplicationAgent agent = new SimpleReplicationAgent(name, new String[0], true,
-                transportHandler, packageBuilder, queueProvider, distributionHandler, null);
+                transportHandler, packageBuilder, queueProvider, distributionHandler, null,
null);
         ReplicationQueue queue = mock(ReplicationQueue.class);
         when(queueProvider.getDefaultQueue(agent)).thenReturn(queue);
         assertNotNull(agent.getQueue(null));
@@ -145,7 +152,7 @@ public class SimpleReplicationAgentTest 
         ReplicationQueueProvider queueProvider = mock(ReplicationQueueProvider.class);
         ReplicationQueueDistributionStrategy distributionHandler = mock(ReplicationQueueDistributionStrategy.class);
         SimpleReplicationAgent agent = new SimpleReplicationAgent(name, new String[0], true,
-                transportHandler, packageBuilder, queueProvider, distributionHandler, null);
+                transportHandler, packageBuilder, queueProvider, distributionHandler, null,
null);
         ReplicationQueue queue = mock(ReplicationQueue.class);
         when(queueProvider.getQueue(agent, "priority")).thenReturn(queue);
         assertNotNull(agent.getQueue("priority"));
@@ -159,7 +166,7 @@ public class SimpleReplicationAgentTest 
         ReplicationQueueProvider queueProvider = mock(ReplicationQueueProvider.class);
         ReplicationQueueDistributionStrategy distributionHandler = mock(ReplicationQueueDistributionStrategy.class);
         SimpleReplicationAgent agent = new SimpleReplicationAgent(name, new String[0], true,
-                transportHandler, packageBuilder, queueProvider, distributionHandler, null);
+                transportHandler, packageBuilder, queueProvider, distributionHandler, null,
null);
         ReplicationQueue queue = mock(ReplicationQueue.class);
         when(queueProvider.getQueue(agent, "priority")).thenReturn(queue);
         assertNull(agent.getQueue("weird"));



Mime
View raw message