Sha256: 554cd7fcb275aede286af4bbe86e1cd45706508835738e5395b80474722e187c

Contents?: true

Size: 815 Bytes

Versions: 16

Compression:

Stored size: 815 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 < 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.chomp
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
newrelic_rpm-3.6.4.122 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.4.113.beta test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.3.111 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.3.106 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.3.105.beta test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.3.104 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.3.103.beta test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.2.96 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.2.90.beta test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.1.88 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.1.87 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.1.86.beta test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.1.85.beta test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.0.83 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.0.78 test/multiverse/suites/agent_only/start_up_test.rb
newrelic_rpm-3.6.0.74.beta test/multiverse/suites/agent_only/start_up_test.rb