Sha256: 6bd540d9213cc21c1f97718ae716b91cca9fd19fb7d86c1aa4c96d0712df113d

Contents?: true

Size: 905 Bytes

Versions: 12

Compression:

Stored size: 905 Bytes

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.

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

class StartUpTest < MiniTest::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

    expected_noise = [
      "JRuby limited openssl loaded. http://jruby.org/openssl\n",
      "gem install jruby-openssl for full support.\n",
      "fatal: Not a git repository (or any of the parent directories): .git\n",
      /Exception\: java\.lang.*\n/]

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

    assert_equal '', output.chomp
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
newrelic_rpm-3.7.1.188 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.7.1.182 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.7.1.180 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.7.0.177 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.7.0.174.beta test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.9.171 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.8.168 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.8.164 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.7.159 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.7.159.beta test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.7.152 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.6.147 test/multiverse/suites/agent_only/start_up_test.rb