Give up for now; will probably do vagrant in the future. For now just requiring a live redis server externally for redis tests

This commit is contained in:
Jordan Sissel 2012-10-21 00:17:04 -07:00
parent 8e17cc292b
commit 83218266a4
3 changed files with 0 additions and 36 deletions

View file

@ -4,23 +4,6 @@ require "redis"
describe "inputs/redis" do
extend LogStash::RSpec
before :each do
service = File.join(File.dirname(__FILE__), "../../test/services/redis")
system("make -C '#{service}' build")
redis = Dir.glob(File.join(service, "redis*/src/redis-server")).first
@redis_proc = IO.popen("cd '#{service}'; exec '#{redis}' 2>&1", "r")
Thread.new do
@redis_proc.each do |line|
puts "redis[#{@redis_proc.pid}]: #{line.chomp}"
end
end
end
after :each do
Process.kill("KILL", @redis_proc.pid)
Process.wait(@redis_proc.pid)
end
describe "read events from a list" do
key = 10.times.collect { rand(10).to_s }.join("")
event_count = 1000 + rand(50)

View file

@ -5,24 +5,6 @@ require "redis"
describe LogStash::Outputs::Redis do
extend LogStash::RSpec
around :each do |example|
service = File.join(File.dirname(__FILE__), "../../test/services/redis")
system("make -C '#{service}' build")
redis = Dir.glob(File.join(service, "redis*/src/redis-server")).first
puts "STARTING REDIS"
redis_proc = IO.popen("cd '#{service}'; exec '#{redis}' 2>&1", "r")
Thread.new do
redis_proc.each do |line|
puts "redis[#{redis_proc.pid}]: #{line.chomp}"
end
end
example.run
Process.kill("KILL", redis_proc.pid)
Process.wait(redis_proc.pid)
end
describe "ship lots of events to a list" do
key = 10.times.collect { rand(10).to_s }.join("")
event_count = 10000 + rand(500)

View file

@ -110,4 +110,3 @@ class Shiftback
@block.call(event)
end
end # class Shiftback