aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIvar Refsdal <refsdal.ivar@gmail.com>2022-03-27 18:39:44 +0200
committerIvar Refsdal <refsdal.ivar@gmail.com>2022-03-27 18:39:44 +0200
commit6c26a3b6871286510bb8e9770ee7f7e3abf97abe (patch)
treee5b831db0f727c77255df58edd7e07275c7bb4d0 /test
parentDocument (diff)
downloadfiinha-6c26a3b6871286510bb8e9770ee7f7e3abf97abe.tar.gz
fiinha-6c26a3b6871286510bb8e9770ee7f7e3abf97abe.tar.xz
Start use current millis in the database, not nano offset
Diffstat (limited to 'test')
-rw-r--r--test/com/github/ivarref/yoltq/test_utils.clj9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/com/github/ivarref/yoltq/test_utils.clj b/test/com/github/ivarref/yoltq/test_utils.clj
index 5427ff5..e4151c2 100644
--- a/test/com/github/ivarref/yoltq/test_utils.clj
+++ b/test/com/github/ivarref/yoltq/test_utils.clj
@@ -8,7 +8,8 @@
[com.github.ivarref.yoltq.impl :as i]
[clojure.edn :as edn]
[com.github.ivarref.yoltq.ext-sys :as ext])
- (:import (java.util UUID)))
+ (:import (java.util UUID)
+ (java.time Duration)))
(logconfig/init-logging!
@@ -39,10 +40,10 @@
(defn advance! [tp]
- (assert (some? ext/*now-ns-atom*) "Expected to be running in test-mode!")
- (swap! ext/*now-ns-atom* + (if (number? tp)
+ (assert (some? ext/*now-ms-atom*) "Expected to be running in test-mode!")
+ (swap! ext/*now-ms-atom* + (if (number? tp)
tp
- (.toNanos tp))))
+ (.toMillis ^Duration tp))))
(defn done-count []