Sha256: e5167b398bf423fc49311c0d90532928a44bfdd1c175237e19ceb7129b51aeee

Contents?: true

Size: 650 Bytes

Versions: 8

Compression:

Stored size: 650 Bytes

Contents

# RUBY-839 make sure there is no STDOUT chatter
require 'open3'

class StartUpTest < Test::Unit::TestCase
  def test_should_not_print_to_stdout_when_logging_available
    ruby = 'require "newrelic_rpm"; NewRelic::Agent.manual_start; NewRelic::Agent.shutdown'
    cmd = "bundle exec ruby -e '#{ruby}'"

    sin, sout, serr = Open3.popen3(cmd)
    output = sout.read + serr.read

    jruby_noise = [
      "JRuby limited openssl loaded. http://jruby.org/openssl\n",
      "gem install jruby-openssl for full support.\n",
      /Exception\: java\.lang.*\n/]

    jruby_noise.each {|noise| output.gsub!(noise, "")}

    assert_equal '', output
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
newrelic_rpm-3.5.7.59 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.5.7.59.beta test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.5.7.58.beta test/multiverse/suites/agent_only/start_up_test.rb
wd_newrelic_rpm-3.5.6 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.5.7.57.beta test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.5.6.55 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.5.6.48.beta test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.5.6.46.beta test/multiverse/suites/agent_only/start_up_test.rb