mirror of
https://github.com/jimeh/amqp-failover.git
synced 2026-02-19 10:56:44 +00:00
major restructuring, specs probably all break
right now
This commit is contained in:
@@ -5,7 +5,7 @@ require 'spec_helper'
|
||||
require 'amqp/server'
|
||||
require 'server_helper'
|
||||
|
||||
describe "Simple AMQP connection with FailoverClient" do
|
||||
describe "Simple AMQP connection with FailoverClient loaded" do
|
||||
|
||||
before(:all) do
|
||||
@log = ServerHelper.log
|
||||
@@ -28,4 +28,21 @@ describe "Simple AMQP connection with FailoverClient" do
|
||||
}
|
||||
end
|
||||
|
||||
it "should connect and get disconnected" do
|
||||
lambda {
|
||||
EM.run {
|
||||
spid = start_server
|
||||
conn = AMQP.connect(:host => 'localhost', :port => 15672)
|
||||
EM.add_timer(0.1) {
|
||||
conn.should be_connected
|
||||
stop_server(spid)
|
||||
EM.add_timer(0.1) {
|
||||
conn.should_not be_connected
|
||||
EM.stop
|
||||
}
|
||||
}
|
||||
}
|
||||
}.should raise_error(AMQP::Error, "Could not connect to server localhost:15672")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user