james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [james-project] 08/11: JAMES-2713 Move UpdatableTickingClock to server-testing for using in other modules
Date Thu, 18 Apr 2019 07:00:23 GMT
This is an automated email from the ASF dual-hosted git repository.

aduprat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 0957eec827440f777fc99728b10cd08c646b2a75
Author: datph <dphamhoang@linagora.com>
AuthorDate: Wed Apr 17 14:35:52 2019 +0700

    JAMES-2713 Move UpdatableTickingClock to server-testing for using in other modules
---
 .../rabbitmq/RabbitMQMailQueueConfigurationChangeTest.java     |  1 +
 .../org/apache/james/queue/rabbitmq/RabbitMQMailQueueTest.java |  1 +
 .../java/org/apache/james/utils}/UpdatableTickingClock.java    | 10 +++++-----
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/RabbitMQMailQueueConfigurationChangeTest.java
b/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/RabbitMQMailQueueConfigurationChangeTest.java
index 46dfdbe..c4fe56f 100644
--- a/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/RabbitMQMailQueueConfigurationChangeTest.java
+++ b/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/RabbitMQMailQueueConfigurationChangeTest.java
@@ -53,6 +53,7 @@ import org.apache.james.queue.rabbitmq.view.cassandra.CassandraMailQueueViewModu
 import org.apache.james.queue.rabbitmq.view.cassandra.CassandraMailQueueViewTestFactory;
 import org.apache.james.queue.rabbitmq.view.cassandra.configuration.CassandraMailQueueViewConfiguration;
 import org.apache.james.util.streams.Iterators;
+import org.apache.james.utils.UpdatableTickingClock;
 import org.apache.mailet.Mail;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
diff --git a/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/RabbitMQMailQueueTest.java
b/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/RabbitMQMailQueueTest.java
index dd9b53d..c636b9d 100644
--- a/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/RabbitMQMailQueueTest.java
+++ b/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/RabbitMQMailQueueTest.java
@@ -54,6 +54,7 @@ import org.apache.james.queue.rabbitmq.view.cassandra.CassandraMailQueueViewModu
 import org.apache.james.queue.rabbitmq.view.cassandra.CassandraMailQueueViewTestFactory;
 import org.apache.james.queue.rabbitmq.view.cassandra.configuration.CassandraMailQueueViewConfiguration;
 import org.apache.james.util.streams.Iterators;
+import org.apache.james.utils.UpdatableTickingClock;
 import org.apache.mailet.Mail;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
diff --git a/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/UpdatableTickingClock.java
b/server/testing/src/main/java/org/apache/james/utils/UpdatableTickingClock.java
similarity index 89%
rename from server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/UpdatableTickingClock.java
rename to server/testing/src/main/java/org/apache/james/utils/UpdatableTickingClock.java
index fca8022..2db26c7 100644
--- a/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/UpdatableTickingClock.java
+++ b/server/testing/src/main/java/org/apache/james/utils/UpdatableTickingClock.java
@@ -17,7 +17,7 @@
  * under the License.                                           *
  ****************************************************************/
 
-package org.apache.james.queue.rabbitmq;
+package org.apache.james.utils;
 
 import java.time.Clock;
 import java.time.Instant;
@@ -25,14 +25,14 @@ import java.time.ZoneId;
 
 import org.apache.commons.lang3.NotImplementedException;
 
-class UpdatableTickingClock extends Clock {
+public class UpdatableTickingClock extends Clock {
     private Instant currentInstant;
 
-    UpdatableTickingClock(Instant currentInstant) {
+    public UpdatableTickingClock(Instant currentInstant) {
         this.currentInstant = currentInstant;
     }
 
-    void setInstant(Instant instant) {
+    public void setInstant(Instant instant) {
         currentInstant = instant;
     }
 
@@ -51,7 +51,7 @@ class UpdatableTickingClock extends Clock {
         return currentInstant;
     }
 
-    synchronized void tick() {
+    public synchronized void tick() {
         currentInstant = currentInstant.plusMillis(1);
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message