Skip to content
Browse files

eek, fix cart tests

  • Loading branch information...
1 parent 80b52a0 commit b55706529f60f44238d6e79f0acc771243c1176e @palvaro palvaro committed Oct 27, 2011
Showing with 2 additions and 3 deletions.
  1. +1 −1 cart/destructive_cart.rb
  2. +1 −2 test/cart_workloads.rb
View
2 cart/destructive_cart.rb
@@ -10,7 +10,7 @@ module DestructiveCart
include KVSProtocol
def delete_one(a, i)
- a.delete_at(a.index(i))
+ a.delete_at(a.index(i)) unless a.index(i).nil?
return a
end
View
3 test/cart_workloads.rb
@@ -2,7 +2,7 @@
require 'bud'
module CartWorkloads
- def run_cart(program, client, actions)
+ def run_cart(program, client, actions=3)
addy = "#{program.ip}:#{program.port}"
contact = client.nil? ? program : client
contact.async_do {
@@ -11,7 +11,6 @@ def run_cart(program, client, actions)
contact.client_action <+ [[addy, 1234, 125, 'diapers', 'Add']]
contact.client_action <+ [[addy, 1234, 126, 'meat', 'Del']]
-
(0..actions).each do |i|
contact.client_action <+ [[addy, 1234, 127 + i, 'beer', 'Add']]
end

0 comments on commit b557065

Please sign in to comment.
Something went wrong with that request. Please try again.