Permalink
Browse files

Set the default for domain_mode but don't override it when set to false.

  • Loading branch information...
1 parent ad612b1 commit ef546e2bf94c2a86b94a577b2b2570960342d012 @jcrossley3 jcrossley3 committed Apr 18, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/torquespec/torquespec.rb
@@ -1,4 +1,5 @@
require 'torquespec/deployment_descriptor'
+require 'java'
module TorqueSpec
@@ -26,17 +27,13 @@ def configure
def jvm_args
max_heap ? @jvm_args.sub(/-Xmx\w+/, "-Xmx#{max_heap}") : @jvm_args
end
- def domain_mode
- @domain_mode ||= java.lang.System.getProperty('domain.mode') || ENV['DOMAIN_MODE']
- end
def as7?
File.exist?( File.join( jboss_home, "bin/standalone.sh" ) )
end
def jboss_home
@jboss_home ||= ENV['JBOSS_HOME'] || jboss_home_from_server_gem
end
def jruby_home
- require 'java'
File.expand_path(java.lang.System.getProperty('jruby.home'))
end
def java_home
@@ -94,6 +91,7 @@ def self.local
TorqueSpec.configure do |config|
config.drb_port = 7772
config.knob_root = ".torquespec"
+ config.domain_mode = %w(yes true 1).include?(java.lang.System.getProperty('domain.mode') || ENV['DOMAIN_MODE'])
config.jvm_args = "-Xms64m -Xmx1024m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -Djruby.home=#{config.jruby_home}"
end

0 comments on commit ef546e2

Please sign in to comment.