Skip to content

Commit

Permalink
updated transactional topology tests to new behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Marz committed Feb 12, 2012
1 parent 3a5e40f commit 8c9de21
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions test/clj/backtype/storm/transactional_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -480,14 +480,20 @@
"gcommit" [[2 3]]})

(fail-tx! 2)
(tracked-wait topo-info 1)
(tracked-wait topo-info 2)

(verify! {"sum" [[2 "apple" 1]
[2 "dog" 3]
[2 "zebra" 1]]
[2 "zebra" 1]
[3 "a" 5]
[3 "b" 2]
[3 "d" 4]
[3 "c" 1]
[3 "e" 7]]
"count" []
"count2" []
"global" [[2 3]]
"global" [[2 3]
[3 7]]
"gcommit" []})
(ack-tx! 2)
(tracked-wait topo-info 1)
Expand All @@ -503,7 +509,8 @@
"gcommit" [[2 3]]})

(ack-tx! 2)

(ack-tx! 3)

(tracked-wait topo-info 2)
(verify! {"sum" [[4 "c" 14]]
"count" [[3 "a" 3]
Expand All @@ -518,7 +525,7 @@
[3 "e" 2]]
"global" [[4 2]]
"gcommit" [[3 7]]})

(ack-tx! 4)
(ack-tx! 3)
(tracked-wait topo-info 2)
Expand All @@ -527,7 +534,7 @@
"count2" [[4 "c" 2]]
"global" [[5 0]]
"gcommit" [[4 2]]})

(ack-tx! 5)
(ack-tx! 4)
(tracked-wait topo-info 2)
Expand All @@ -536,7 +543,7 @@
"count2" []
"global" [[6 0]]
"gcommit" [[5 0]]})

(-> topo-info :capturer .getAndClearResults)
))))

Expand Down

0 comments on commit 8c9de21

Please sign in to comment.