spec/onstomp/full_stacks/failover_spec.rb in onstomp-1.0.2 vs spec/onstomp/full_stacks/failover_spec.rb in onstomp-1.0.3
- old
+ new
@@ -56,11 +56,11 @@
:'x-onstomp-real-client' => client.active_client.uri
sub = client.subscribe('/queue/onstomp/failover/test2', :'x-onstomp-real-client' => client.active_client.uri) do |m|
end
client.unsubscribe sub, :'x-onstomp-real-client' => client.active_client.uri
client.commit 't-1234', :'x-onstomp-real-client' => client.active_client.uri
-
+ #Thread.pass until client.connected?
client.disconnect :'x-onstomp-real-client' => client.active_client.uri
brokers.each(&:join)
brokers.first.frames_received.map(&:command).should == ["CONNECT", "SEND", "BEGIN", "SEND", "SUBSCRIBE"]
brokers.last.frames_received.map(&:command).should == ["CONNECT", "BEGIN", "SEND", "SUBSCRIBE", "SEND", "COMMIT", "SEND", "DISCONNECT"]
end
@@ -94,10 +94,10 @@
:'x-onstomp-real-client' => client.active_client.uri
sub = client.subscribe('/queue/onstomp/failover/test2', :'x-onstomp-real-client' => client.active_client.uri) do |m|
end
client.unsubscribe sub, :'x-onstomp-real-client' => client.active_client.uri
client.commit 't-1234', :'x-onstomp-real-client' => client.active_client.uri
-
+ #Thread.pass until client.connected?
client.disconnect :'x-onstomp-real-client' => client.active_client.uri
brokers.each(&:join)
brokers.first.frames_received.map(&:command).should == ["CONNECT", "SEND", "BEGIN", "SEND", "SUBSCRIBE"]
brokers.last.frames_received.map(&:command).should == ["CONNECT", "SEND", "BEGIN", "SEND", "SUBSCRIBE", "SEND", "SEND", "COMMIT", "SEND", "DISCONNECT"]
end