diff options
author | KC Braunschweig <kcbraunschweig@gmail.com> | 2014-02-10 10:41:23 +0000 |
---|---|---|
committer | adamedx <adamed@opscode.com> | 2014-03-31 09:47:16 -0700 |
commit | f4dcc0b5772591fa0cd6fe4500ef297ef57a1c4f (patch) | |
tree | c2ed7e0d128080b39532fb0286aca9cec4e8e7a5 | |
parent | 9b0688a35b58989b7274448401d6e63cfba2ee29 (diff) | |
download | ohai-f4dcc0b5772591fa0cd6fe4500ef297ef57a1c4f.tar.gz |
go with 64mb instead because that was the old default
-rw-r--r-- | lib/ohai/plugins/java.rb | 2 | ||||
-rw-r--r-- | spec/unit/plugins/java_spec.rb | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/ohai/plugins/java.rb b/lib/ohai/plugins/java.rb index e413f3ab..9f71eb7f 100644 --- a/lib/ohai/plugins/java.rb +++ b/lib/ohai/plugins/java.rb @@ -22,7 +22,7 @@ Ohai.plugin(:Java) do def get_java_info java = Mash.new - so = shell_out("java -mx16m -version") + so = shell_out("java -mx64m -version") if so.exitstatus == 0 so.stderr.split(/\r?\n/).each do |line| case line diff --git a/spec/unit/plugins/java_spec.rb b/spec/unit/plugins/java_spec.rb index 6d722222..a56e0e1e 100644 --- a/spec/unit/plugins/java_spec.rb +++ b/spec/unit/plugins/java_spec.rb @@ -28,11 +28,11 @@ describe Ohai::System, "plugin java (Java5 Client VM)" do shared_examples_for "when the JRE is installed" do before do @stderr = "java version \"1.5.0_16\"\nJava(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)\nJava HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)" - @plugin.stub(:shell_out).with("java -mx16m -version").and_return(mock_shell_out(0, "", @stderr)) + @plugin.stub(:shell_out).with("java -mx64m -version").and_return(mock_shell_out(0, "", @stderr)) end - it "should run java -mx16m -version" do - @plugin.should_receive(:shell_out).with("java -mx16m -version").and_return(mock_shell_out(0, "", @stderr)) + it "should run java -mx64m -version" do + @plugin.should_receive(:shell_out).with("java -mx64m -version").and_return(mock_shell_out(0, "", @stderr)) @plugin.run end @@ -63,7 +63,7 @@ describe Ohai::System, "plugin java (Java5 Client VM)" do it "should not set the languages[:java] tree up if java command fails" do @stderr = "Some error output here" - @plugin.stub(:shell_out).with("java -mx16m -version").and_return(mock_shell_out(1, "", @stderr)) + @plugin.stub(:shell_out).with("java -mx64m -version").and_return(mock_shell_out(1, "", @stderr)) @plugin.run @plugin[:languages].should_not have_key(:java) end @@ -73,11 +73,11 @@ describe Ohai::System, "plugin java (Java5 Client VM)" do before(:each) do @stderr = "java version \"1.6.0_22\"\nJava(TM) 2 Runtime Environment (build 1.6.0_22-b04)\nJava HotSpot(TM) Server VM (build 17.1-b03, mixed mode)" - @plugin.stub(:shell_out).with("java -mx16m -version").and_return(mock_shell_out(0, "", @stderr)) + @plugin.stub(:shell_out).with("java -mx64m -version").and_return(mock_shell_out(0, "", @stderr)) end - it "should run java -mx16m -version" do - @plugin.should_receive(:shell_out).with("java -mx16m -version").and_return(mock_shell_out(0, "", @stderr)) + it "should run java -mx64m -version" do + @plugin.should_receive(:shell_out).with("java -mx64m -version").and_return(mock_shell_out(0, "", @stderr)) @plugin.run end @@ -108,7 +108,7 @@ describe Ohai::System, "plugin java (Java5 Client VM)" do it "should not set the languages[:java] tree up if java command fails" do @stderr = "Some error output here" - @plugin.stub(:shell_out).with("java -mx16m -version").and_return(mock_shell_out(0, "", @stderr)) + @plugin.stub(:shell_out).with("java -mx64m -version").and_return(mock_shell_out(0, "", @stderr)) @plugin.run @plugin[:languages].should_not have_key(:java) end @@ -159,7 +159,7 @@ describe Ohai::System, "plugin java (Java5 Client VM)" do end it "does not attempt to get java info" do - @plugin.should_not_receive(:shell_out).with("java -mx16m -version") + @plugin.should_not_receive(:shell_out).with("java -mx64m -version") @plugin.run @plugin[:languages].should_not have_key(:java) end |