Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Tests can now assert message order thanks to ABS.
Browse files Browse the repository at this point in the history
  • Loading branch information
lbradstreet committed May 15, 2018
1 parent 84d0edc commit 3d02fc4
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/onyx/windowing/aggregation_average_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,5 @@
:task-scheduler :onyx.task-scheduler/balanced})
_ (onyx.test-helper/feedback-exception! peer-config job-id)
results (take-segments! @out-chan 50)]
(is (= (into #{} input) (into #{} results)))
(is (= input results))
(is (= expected-windows @test-state))))))
2 changes: 1 addition & 1 deletion test/onyx/windowing/aggregation_conj_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,6 @@
:task-scheduler :onyx.task-scheduler/balanced})
_ (onyx.test-helper/feedback-exception! peer-config (:job-id job))
results (take-segments! @out-chan 50)]
(is (= (into #{} input) (into #{} results)))
(is (= input results))
(is (= (sort-by first expected-windows)
(sort-by first @test-state)))))))
2 changes: 1 addition & 1 deletion test/onyx/windowing/aggregation_count_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,5 @@
:task-scheduler :onyx.task-scheduler/balanced})
_ (onyx.test-helper/feedback-exception! peer-config job-id)
results (take-segments! @out-chan 50)]
(is (= (into #{} input) (into #{} results)))
(is (= input results))
(is (= (sort expected-windows) (sort @test-state)))))))
2 changes: 1 addition & 1 deletion test/onyx/windowing/aggregation_grouping_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,5 @@
end-time (System/currentTimeMillis)
max-n-extent-fires (apply max (vals @fire-count))
results (take-segments! @out-chan 50)]
(is (= (into #{} input) (into #{} results)))
(is (= input results))
(is (= expected-windows @test-state)))))))
2 changes: 1 addition & 1 deletion test/onyx/windowing/aggregation_max_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,5 @@
:task-scheduler :onyx.task-scheduler/balanced})
_ (onyx.test-helper/feedback-exception! peer-config job-id)
results (take-segments! @out-chan 50)]
(is (= (into #{} input) (into #{} results)))
(is (= input results))
(is (= expected-windows @test-state))))))
2 changes: 1 addition & 1 deletion test/onyx/windowing/aggregation_min_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,5 @@
:task-scheduler :onyx.task-scheduler/balanced})
_ (onyx.test-helper/feedback-exception! peer-config job-id)
results (take-segments! @out-chan 50)]
(is (= (into #{} input) (into #{} results)))
(is (= input results))
(is (= expected-windows @test-state))))))
2 changes: 1 addition & 1 deletion test/onyx/windowing/aggregation_ordered_log_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,6 @@
:task-scheduler :onyx.task-scheduler/balanced})
_ (onyx.test-helper/feedback-exception! peer-config (:job-id job))
results (take-segments! @out-chan 50)]
(is (= (into #{} input) (into #{} results)))
(is (= input results))
(is (= (sort-by first expected-windows)
(sort-by first @test-state)))))))
2 changes: 1 addition & 1 deletion test/onyx/windowing/collect_by_key_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
:task-scheduler :onyx.task-scheduler/balanced}))
_ (onyx.test-helper/feedback-exception! peer-config job-id)
results (take-segments! @out-chan 50)]
(is (= (into #{} input) (into #{} results)))
(is (= input results))
(let [state (deref test-state 5000 nil)]
(is (= {:a
#{{:id 4 :team :a :event-time #inst "2015-09-13T03:06:00.829-00:00"}
Expand Down

0 comments on commit 3d02fc4

Please sign in to comment.