diff options
| author | Ivar Refsdal <ivar.refsdal@nsd.no> | 2021-09-23 14:33:09 +0200 |
|---|---|---|
| committer | Ivar Refsdal <ivar.refsdal@nsd.no> | 2021-09-23 14:33:09 +0200 |
| commit | 74ef39824b6eb0f8f69720e2f6209ec3de0cefbe (patch) | |
| tree | 12f72cf9a26f0e1139e6eaaafd056d51660865fe /test | |
| parent | Release 0.2.22 (diff) | |
| download | fiinha-74ef39824b6eb0f8f69720e2f6209ec3de0cefbe.tar.gz fiinha-74ef39824b6eb0f8f69720e2f6209ec3de0cefbe.tar.xz | |
Document ordering and depends on as well as add license
Diffstat (limited to 'test')
| -rw-r--r-- | test/com/github/ivarref/yoltq/virtual_test.clj | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/test/com/github/ivarref/yoltq/virtual_test.clj b/test/com/github/ivarref/yoltq/virtual_test.clj index 789e5b4..93ad0b6 100644 --- a/test/com/github/ivarref/yoltq/virtual_test.clj +++ b/test/com/github/ivarref/yoltq/virtual_test.clj @@ -299,15 +299,11 @@ (yq/init! {:conn conn}) (yq/add-consumer! :a identity) (yq/add-consumer! :b identity) - @(d/transact conn [(yq/put :a "a" {:id "1"})]) - (is (thrown? Exception @(d/transact conn [(yq/put :b "b" {:depends-on [:a "0"]})]))) - @(d/transact conn [(yq/put :b "b" {:depends-on [:a "1"]})]) + @(d/transact conn [(yq/put :a {:id "a1"} {:id "a1"})]) + @(d/transact conn [(yq/put :b {:id "b1"} {:depends-on [:a "a1"]})]) ; can't consume :b yet: - (is (= {:depends-on [:a "1"]} (tq/consume! :b))) - (is (= {:depends-on [:a "1"]} (tq/consume! :b))) - - (is (= "a" (tq/consume! :a))) - (is (= "b" (tq/consume! :b))) - (is (= "b" (tq/force-retry! :b))))) + (is (= {:depends-on [:a "a1"]} (tq/consume! :b))) + (is (= {:id "a1"} (tq/consume! :a))) + (is (= {:id "b1"} (tq/consume! :b))))) |
