mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
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:
parent
8e17cc292b
commit
83218266a4
3 changed files with 0 additions and 36 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -110,4 +110,3 @@ class Shiftback
|
|||
@block.call(event)
|
||||
end
|
||||
end # class Shiftback
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue