diff options
| author | Luke Kanies <luke@madstop.com> | 2009-05-12 22:12:45 -0500 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-05-18 17:07:18 +1000 |
| commit | 4bf2980577c2e1233b7102540237aae01c70bde5 (patch) | |
| tree | 31ef01e4be4cce9c24420318288d1aeea35572c1 /spec/unit/util/queue | |
| parent | f4cb8f36dfb2ae05d64ef609d03795537b0720fa (diff) | |
| download | puppet-4bf2980577c2e1233b7102540237aae01c70bde5.tar.gz puppet-4bf2980577c2e1233b7102540237aae01c70bde5.tar.xz puppet-4bf2980577c2e1233b7102540237aae01c70bde5.zip | |
Protecting Stomp client against internal failures
Apparently the stomp client is really unhelpful with
failures; this attempts to provide at least a bit
more information.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/util/queue')
| -rwxr-xr-x | spec/unit/util/queue/stomp.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/util/queue/stomp.rb b/spec/unit/util/queue/stomp.rb index f2960b3f8..2adf320e1 100755 --- a/spec/unit/util/queue/stomp.rb +++ b/spec/unit/util/queue/stomp.rb @@ -45,6 +45,11 @@ describe 'Puppet::Util::Queue::Stomp' do lambda { Puppet::Util::Queue::Stomp.new }.should raise_error(ArgumentError) end + it "should fail somewhat helpfully if the Stomp client cannot be created" do + Stomp::Client.expects(:new).raises RuntimeError + lambda { Puppet::Util::Queue::Stomp.new }.should raise_error(ArgumentError) + end + list = %w{user password host port} {"user" => "myuser", "password" => "mypass", "host" => "foohost", "port" => 42}.each do |name, value| it "should use the #{name} from the queue source as the queueing #{name}" do |
