Permalink
Browse files

Making sure that unordered values are supplied to map/reduce job.

  • Loading branch information...
1 parent d9f9aa2 commit e65578ba21f0c9b77253ffab7fce30f9bc64877e @ifesdjeen ifesdjeen committed Aug 31, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 test/clojurewerkz/welle/test/mr_test.clj
@@ -12,9 +12,11 @@
(deftest ^{:mr true} test-basic-map-reduce-with-erlang-builtins
(let [bucket-name "clojurewerkz.welle.mr1"
- bucket (wb/update bucket-name)]
- (doseq [l (range 0 200)]
- (kv/store bucket-name (str "java_" l) (str l) :content-type "text/plain"))
+ bucket (wb/update bucket-name :last-write-wins true)
+ store-fn #(kv/store bucket-name (str "java_" %) (str %) :content-type "text/plain")]
+ ;; Make sure we supply unordered values
+ (doseq [l (range 100 200)] (store-fn l))
+ (doseq [l (range 0 100)] (store-fn l))
(let [result (mr/map-reduce {:inputs bucket-name
:query [{:map {:language "erlang"
:module "riak_kv_mapreduce"

0 comments on commit e65578b

Please sign in to comment.