-
-
Save bbrowning/606769 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "should be able to publish to and receive from a topic" do | |
topic = TorqueBox::Messaging::Topic.new "/topics/foo" | |
topic.start | |
latch = java.util.concurrent.CountDownLatch.new(1) | |
t1 = Thread.new { topic.publish "howdy"; latch.countDown } | |
latch.await | |
message = topic.receive | |
topic.destroy | |
message.should eql( "howdy" ) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment