Skip to content

Commit

Permalink
Get the tests running under jruby, even though they don't all pass yet
Browse files Browse the repository at this point in the history
  • Loading branch information
soupmatt committed Aug 3, 2012
1 parent d08b6f9 commit f0b6709
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/queues
queues
activemq-data
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
source "http://rubygems.org"

gem 'reliable-msg', '~>1.1' if RUBY_VERSION < '1.9'
gem 'reliable-msg', '~>1.1', :platform => :ruby if RUBY_VERSION < '1.9'
gem 'jruby-activemq', :platform => :jruby
gem 'appraisal'

gemspec
10 changes: 9 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,27 @@ PATH
GEM
remote: http://rubygems.org/
specs:
activesupport (2.3.14)
activesupport (3.2.7)
i18n (~> 0.6)
multi_json (~> 1.0)
appraisal (0.4.1)
bundler
rake
celluloid (0.11.1)
timers (>= 1.0.0)
git (1.2.5)
i18n (0.6.0)
jeweler (1.8.4)
bundler (~> 1.0)
git (>= 1.2.5)
rake
rdoc
jruby-activemq (5.5.1-java)
json (1.7.4)
json (1.7.4-java)
macaddr (1.6.1)
systemu (~> 2.5.0)
multi_json (1.3.6)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
Expand All @@ -37,12 +43,14 @@ GEM
macaddr (~> 1.0)

PLATFORMS
java
ruby

DEPENDENCIES
activemessaging!
activesupport
appraisal
jeweler
jruby-activemq
reliable-msg (~> 1.1)
stomp
3 changes: 2 additions & 1 deletion gemfiles/activesupport23.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

source "http://rubygems.org"

gem "reliable-msg", "~>1.1"
gem "reliable-msg", "~>1.1", :platform=>:ruby
gem "jruby-activemq", :platform=>:jruby
gem "appraisal"
gem "activesupport", "~> 2.3.11"

Expand Down
4 changes: 4 additions & 0 deletions gemfiles/activesupport23.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ GEM
git (>= 1.2.5)
rake
rdoc
jruby-activemq (5.5.1-java)
json (1.7.4)
json (1.7.4-java)
macaddr (1.6.1)
systemu (~> 2.5.0)
rake (0.9.2.2)
Expand All @@ -37,12 +39,14 @@ GEM
macaddr (~> 1.0)

PLATFORMS
java
ruby

DEPENDENCIES
activemessaging!
activesupport (~> 2.3.11)
appraisal
jeweler
jruby-activemq
reliable-msg (~> 1.1)
stomp
3 changes: 2 additions & 1 deletion gemfiles/activesupport30.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

source "http://rubygems.org"

gem "reliable-msg", "~>1.1"
gem "reliable-msg", "~>1.1", :platform=>:ruby
gem "jruby-activemq", :platform=>:jruby
gem "appraisal"
gem "activesupport", "~> 3.0.8"
gem "i18n"
Expand Down
4 changes: 4 additions & 0 deletions gemfiles/activesupport30.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ GEM
git (>= 1.2.5)
rake
rdoc
jruby-activemq (5.5.1-java)
json (1.7.4)
json (1.7.4-java)
macaddr (1.6.1)
systemu (~> 2.5.0)
rake (0.9.2.2)
Expand All @@ -38,6 +40,7 @@ GEM
macaddr (~> 1.0)

PLATFORMS
java
ruby

DEPENDENCIES
Expand All @@ -46,5 +49,6 @@ DEPENDENCIES
appraisal
i18n
jeweler
jruby-activemq
reliable-msg (~> 1.1)
stomp
3 changes: 2 additions & 1 deletion gemfiles/activesupport31.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

source "http://rubygems.org"

gem "reliable-msg", "~>1.1"
gem "reliable-msg", "~>1.1", :platform=>:ruby
gem "jruby-activemq", :platform=>:jruby
gem "appraisal"
gem "activesupport", "~> 3.1.2"
gem "i18n"
Expand Down
4 changes: 4 additions & 0 deletions gemfiles/activesupport31.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ GEM
git (>= 1.2.5)
rake
rdoc
jruby-activemq (5.5.1-java)
json (1.7.4)
json (1.7.4-java)
macaddr (1.6.1)
systemu (~> 2.5.0)
multi_json (1.2.0)
Expand All @@ -40,6 +42,7 @@ GEM
macaddr (~> 1.0)

PLATFORMS
java
ruby

DEPENDENCIES
Expand All @@ -48,5 +51,6 @@ DEPENDENCIES
appraisal
i18n
jeweler
jruby-activemq
reliable-msg (~> 1.1)
stomp
3 changes: 2 additions & 1 deletion gemfiles/activesupport32.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

source "http://rubygems.org"

gem "reliable-msg", "~>1.1"
gem "reliable-msg", "~>1.1", :platform=>:ruby
gem "jruby-activemq", :platform=>:jruby
gem "appraisal"
gem "activesupport", "~> 3.2.2"

Expand Down
4 changes: 4 additions & 0 deletions gemfiles/activesupport32.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ GEM
git (>= 1.2.5)
rake
rdoc
jruby-activemq (5.5.1-java)
json (1.7.4)
json (1.7.4-java)
macaddr (1.6.1)
systemu (~> 2.5.0)
multi_json (1.3.6)
Expand All @@ -41,12 +43,14 @@ GEM
macaddr (~> 1.0)

PLATFORMS
java
ruby

DEPENDENCIES
activemessaging!
activesupport (~> 3.2.2)
appraisal
jeweler
jruby-activemq
reliable-msg (~> 1.1)
stomp
3 changes: 2 additions & 1 deletion lib/activemessaging/adapters/jms.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
if defined?(JRUBY_VERSION)
#require 'java'
include Java
require 'activemq'

begin
java_import javax.naming.InitialContext
Expand Down Expand Up @@ -239,4 +240,4 @@ def find_destination queue_name, type
end
end

end
end
7 changes: 4 additions & 3 deletions test/jms_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ class JmsTest < Test::Unit::TestCase
def setup
@test_txt = 'Yo Homie!'
@isolation_const = rand(99999999)
@connection = ActiveMessaging::Adapters::Jms::Connection.new(:url => 'tcp://localhost:61616',
:login => '',
:passcode => '',
@connection = ActiveMessaging::Adapters::Jms::Connection.new(:url => 'vm://jms_test',
:login => '',
:passcode => '',
:connection_factory => 'org.apache.activemq.ActiveMQConnectionFactory')
end

Expand Down Expand Up @@ -42,6 +42,7 @@ def test_receive_multi

def test_one_off_receive
@connection.send "/queue/OneOff#{@isolation_const}", "one off message"
sleep 2
message = @connection.receive "/queue/OneOff#{@isolation_const}"
assert_equal "one off message", message.body
assert_equal "MESSAGE", message.command
Expand Down

0 comments on commit f0b6709

Please sign in to comment.