Open Kitton opened 10 years ago
If you change your code to publish the message then receive a message, do you receive your published message? I'm wondering if it's just an issue with queue.count_messages not working properly outside the running TorqueBox.
The code in your "should send" block doesn't actually run inside TorqueBox. It's still running in your RSpec process, but should be able to connect to the running TorqueBox. If you want this code to actually run inside TorqueBox, you'd need to change your "describe" block to "remote_describe".
Confirm your assumption - "receive" method works, but in my code "count_messages" is used a lot :( About remote_describe, it seems that Rails.root doesn't work there - I have got a lot of error in requires, like this one
"failure-description" : {"JBAS014671: Failed services" : {"jboss.deployment.unit.\"inside_torquebox-knob.yml\".service.TorqueSpec::Daemon.create" : "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"inside_torquebox-knob.yml\".service.TorqueSpec::Daemon.create: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- lib/queues/abstract_queue\n Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- lib/queues/abstract_queue"}},
Good day, I have some problems with the queues.
The output:
So instead of 0 I'm getting nil here and the message isn't published. Have used an advice from here http://stackoverflow.com/questions/17057616/torquebox-torquespec-testing-queues-cant-be-fetched-in-remote-describe-block , but still cant make it work. Any ideas?