summaryrefslogtreecommitdiff
path: root/queue/zset/run.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2015-12-18 14:54:26 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2015-12-18 14:54:26 +0000
commit0b97bce5bac83885dd7843306e2858ab2429c102 (patch)
tree1a6ed872b5bf1e3a5f7f520cde949f407948dd8f /queue/zset/run.rb
parent2db7fba4d74b663da16625a990f7b7624842712a (diff)
Modified zset test program to exit if it encounters a test it has already seen.
This helps with debugging. We expect it to exit eventually, but only after it has seen all tests.
Diffstat (limited to 'queue/zset/run.rb')
-rwxr-xr-xqueue/zset/run.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/queue/zset/run.rb b/queue/zset/run.rb
index 726e19a..2fc861c 100755
--- a/queue/zset/run.rb
+++ b/queue/zset/run.rb
@@ -27,12 +27,19 @@ def fetch(timeout = 1)
end
end
-
+seen = []
while( x = fetch() )
puts "Got job : #{x}"
- if ( x =~ /ping/i )
- puts "PING TEST - sleeping"
+ if seen.include?(x)
+ puts "Already seen #{x}"
+ break
+ end
+
+ seen << x
+
+ if ( x =~ /test 2/i )
+ puts "TEST 2 - sleeping"
sleep 5
end
end