sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpet...@apache.org
Subject svn commit: r1636613 [2/2] - in /sling/trunk/contrib/extensions/replication/core/src: main/java/org/apache/sling/replication/agent/impl/ main/java/org/apache/sling/replication/component/ main/java/org/apache/sling/replication/component/impl/ main/java/...
Date Tue, 04 Nov 2014 15:44:13 GMT
Modified: sling/trunk/contrib/extensions/replication/core/src/test/java/org/apache/sling/replication/queue/impl/simple/SimpleReplicationQueueProviderTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/core/src/test/java/org/apache/sling/replication/queue/impl/simple/SimpleReplicationQueueProviderTest.java?rev=1636613&r1=1636612&r2=1636613&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/test/java/org/apache/sling/replication/queue/impl/simple/SimpleReplicationQueueProviderTest.java
(original)
+++ sling/trunk/contrib/extensions/replication/core/src/test/java/org/apache/sling/replication/queue/impl/simple/SimpleReplicationQueueProviderTest.java
Tue Nov  4 15:44:12 2014
@@ -36,17 +36,12 @@ public class SimpleReplicationQueueProvi
 
     @Test
     public void testGetOrCreateQueue() throws Exception {
-        SimpleReplicationQueueProvider simpleReplicationQueueProvider = new SimpleReplicationQueueProvider();
-        ReplicationQueue queue = simpleReplicationQueueProvider.getInternalQueue("dummy-agent",
"default");
+        SimpleReplicationQueueProvider simpleReplicationQueueProvider = new SimpleReplicationQueueProvider(mock(Scheduler.class),
"agentName");
+        ReplicationQueue queue = simpleReplicationQueueProvider.getQueue("default");
         assertNotNull(queue);
     }
 
-    @Test
-    public void testDeleteQueue() throws Exception {
-        SimpleReplicationQueueProvider simpleReplicationQueueProvider = new SimpleReplicationQueueProvider();
-        ReplicationQueue queue = mock(ReplicationQueue.class);
-        simpleReplicationQueueProvider.deleteQueue(queue);
-    }
+
 
     @Test
     public void testEnableQueueProcessing() throws Exception {
@@ -55,9 +50,9 @@ public class SimpleReplicationQueueProvi
         when(scheduler.NOW(-1, 10)).thenReturn(options);
         when(options.canRunConcurrently(false)).thenReturn(options);
         when(options.name(any(String.class))).thenReturn(options);
-        SimpleReplicationQueueProvider simpleReplicationQueueProvider = new SimpleReplicationQueueProvider(scheduler);
+        SimpleReplicationQueueProvider simpleReplicationQueueProvider = new SimpleReplicationQueueProvider(scheduler,
"dummy-agent");
         ReplicationQueueProcessor processor = mock(ReplicationQueueProcessor.class);
-        simpleReplicationQueueProvider.enableQueueProcessing("dummy-agent", processor);
+        simpleReplicationQueueProvider.enableQueueProcessing(processor);
     }
 
     @Test
@@ -67,7 +62,7 @@ public class SimpleReplicationQueueProvi
         when(scheduler.NOW(-1, 10)).thenReturn(options);
         when(options.canRunConcurrently(false)).thenReturn(options);
         when(options.name(any(String.class))).thenReturn(options);
-        SimpleReplicationQueueProvider simpleReplicationQueueProvider = new SimpleReplicationQueueProvider(scheduler);
-        simpleReplicationQueueProvider.disableQueueProcessing("dummy-agent");
+        SimpleReplicationQueueProvider simpleReplicationQueueProvider = new SimpleReplicationQueueProvider(scheduler,
"dummy-agent");
+        simpleReplicationQueueProvider.disableQueueProcessing();
     }
 }
\ No newline at end of file



Mime
View raw message