Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
FiV0 committed Jul 11, 2023
1 parent 292f38b commit a273369
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions src/test/clojure/xtdb/datalog_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2293,21 +2293,20 @@
(xt/q tu/*node* '{:find [doc]
:where [(match :xt/the-docs {:xt/* doc})]})))))

;; FIXME get xt/txs in
#_(t/deftest test-inconsistent-valid-time-range-2494
(xt/submit-tx tu/*node* '[[:put :xt-docs {:xt/id 1} {:for-valid-time [:in nil #inst "2011"]}]])
(t/is (= [{:tx-id 0, :committed? false}]
(xt/q tu/*node* '{:find [tx-id committed?]
:where [($ :xt/txs {:xt/id tx-id,
:xt/committed? committed?})]})))
(xt/submit-tx tu/*node* '[[:put :xt-docs {:xt/id 2}]])
(xt/submit-tx tu/*node* '[[:delete :xt-docs 2 {:for-valid-time [:in nil #inst "2011"]}]])
(t/is (= [{:tx-id 0, :committed? false}
{:tx-id 1, :committed? true}
{:tx-id 2, :committed? false}]
(xt/q tu/*node* '{:find [tx-id committed?]
:where [($ :xt/txs {:xt/id tx-id,
:xt/committed? committed?})]}))))
(t/deftest test-inconsistent-valid-time-range-2494
(xt/submit-tx tu/*node* '[[:put :xt-docs {:xt/id 1} {:for-valid-time [:in nil #inst "2011"]}]])
(t/is (= [{:tx-id 0, :committed? false}]
(xt/q tu/*node* '{:find [tx-id committed?]
:where [($ :xt/txs {:xt/id tx-id,
:xt/committed? committed?})]})))
(xt/submit-tx tu/*node* '[[:put :xt-docs {:xt/id 2}]])
(xt/submit-tx tu/*node* '[[:delete :xt-docs 2 {:for-valid-time [:in nil #inst "2011"]}]])
(t/is (= #{{:tx-id 0, :committed? false}
{:tx-id 1, :committed? true}
{:tx-id 2, :committed? false}}
(set (xt/q tu/*node* '{:find [tx-id committed?]
:where [($ :xt/txs {:xt/id tx-id,
:xt/committed? committed?})]})))))

(deftest test-date-and-time-literals
(t/is (= [{:a true, :b false, :c true, :d true}]
Expand Down

0 comments on commit a273369

Please sign in to comment.