newrelic_rpm 3.7.2.195 → 3.7.3.199
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/CHANGELOG +25 -1
- data/Rakefile +7 -0
- data/lib/new_relic/agent/agent.rb +19 -13
- data/lib/new_relic/agent/configuration/default_source.rb +23 -0
- data/lib/new_relic/agent/cross_app_tracing.rb +2 -0
- data/lib/new_relic/agent/database.rb +123 -94
- data/lib/new_relic/agent/database/obfuscation_helpers.rb +37 -0
- data/lib/new_relic/agent/database/obfuscator.rb +65 -0
- data/lib/new_relic/agent/database/postgres_explain_obfuscator.rb +49 -0
- data/lib/new_relic/agent/datastores/mongo/metric_translator.rb +2 -1
- data/lib/new_relic/agent/instrumentation/action_controller_subscriber.rb +1 -1
- data/lib/new_relic/agent/instrumentation/active_record_helper.rb +9 -8
- data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +1 -38
- data/lib/new_relic/agent/instrumentation/rubyprof.rb +26 -0
- data/lib/new_relic/agent/instrumentation/typhoeus.rb +3 -2
- data/lib/new_relic/agent/pipe_channel_manager.rb +45 -12
- data/lib/new_relic/agent/pipe_service.rb +14 -8
- data/lib/new_relic/agent/request_sampler.rb +63 -6
- data/lib/new_relic/agent/sampler_collection.rb +5 -2
- data/lib/new_relic/agent/shim_agent.rb +1 -1
- data/lib/new_relic/agent/transaction.rb +41 -22
- data/lib/new_relic/agent/transaction_sample_builder.rb +0 -4
- data/lib/new_relic/agent/transaction_sampler.rb +2 -5
- data/lib/new_relic/agent/transaction_state.rb +43 -11
- data/lib/new_relic/agent/vm.rb +32 -0
- data/lib/new_relic/agent/vm/jruby_vm.rb +40 -0
- data/lib/new_relic/agent/vm/monotonic_gc_profiler.rb +36 -0
- data/lib/new_relic/agent/vm/mri_vm.rb +86 -0
- data/lib/new_relic/agent/vm/rubinius_vm.rb +40 -0
- data/lib/new_relic/agent/vm/snapshot.rb +16 -0
- data/lib/new_relic/control.rb +0 -6
- data/lib/new_relic/language_support.rb +20 -0
- data/lib/new_relic/latest_changes.rb +41 -12
- data/lib/new_relic/rack/developer_mode.rb +8 -1
- data/lib/new_relic/rack/transaction_reset.rb +1 -1
- data/lib/new_relic/transaction_sample.rb +0 -13
- data/lib/new_relic/version.rb +1 -1
- data/lib/tasks/install.rake +5 -0
- data/newrelic_rpm.gemspec +2 -1
- data/test/active_record_fixtures.rb +7 -9
- data/test/agent_helper.rb +11 -50
- data/test/environments/lib/environments/runner.rb +3 -5
- data/test/environments/rails40/Gemfile +12 -3
- data/test/environments/rails41/Gemfile +34 -0
- data/test/environments/rails41/Rakefile +11 -0
- data/test/environments/rails41/config/application.rb +18 -0
- data/test/environments/rails41/config/boot.rb +10 -0
- data/test/environments/rails41/config/database.yml +26 -0
- data/test/environments/rails41/config/environment.rb +6 -0
- data/test/environments/rails41/db/schema.rb +5 -0
- data/test/fixtures/cross_agent_tests/README.md +12 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/basic_where.colon_obfuscated.txt +3 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/basic_where.explain.txt +3 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/basic_where.obfuscated.txt +3 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/basic_where.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/current_date.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/current_date.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/current_date.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/current_date.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/date.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/date.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/date.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/date.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_newline.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_newline.explain.txt +3 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_newline.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_newline.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_quote.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_quote.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_quote.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/embedded_quote.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/floating_point.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/floating_point.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/floating_point.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/floating_point.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/function_with_strings.colon_obfuscated.txt +5 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/function_with_strings.explain.txt +5 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/function_with_strings.obfuscated.txt +5 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/function_with_strings.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/quote_in_table_name.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/quote_in_table_name.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/quote_in_table_name.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/quote_in_table_name.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/subplan.colon_obfuscated.txt +5 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/subplan.explain.txt +5 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/subplan.obfuscated.txt +5 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/subplan.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_integer.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_integer.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_integer.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_integer.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_regex_chars.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_regex_chars.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_regex_chars.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_regex_chars.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_substring.colon_obfuscated.txt +3 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_substring.explain.txt +3 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_substring.obfuscated.txt +3 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/where_with_substring.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case1.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case1.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case1.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case1.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case2.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case2.explain.txt +3 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case2.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case2.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case3.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case3.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case3.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case3.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case4.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case4.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case4.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case4.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case5.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case5.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case5.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case5.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case6.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case6.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case6.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case6.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case7.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case7.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case7.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case7.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case8.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case8.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case8.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case8.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case9.colon_obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case9.explain.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case9.obfuscated.txt +2 -0
- data/test/fixtures/cross_agent_tests/postgres_explain_obfuscation/with_escape_case9.query.txt +1 -0
- data/test/fixtures/cross_agent_tests/rules.json +165 -0
- data/test/fixtures/cross_agent_tests/rum_client_config.json +142 -0
- data/test/fixtures/cross_agent_tests/rum_cookie.json +17 -0
- data/test/fixtures/cross_agent_tests/rum_footer_insertion_location/close-body-in-comment.html +10 -0
- data/test/fixtures/cross_agent_tests/rum_footer_insertion_location/dynamic-iframe.html +19 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/basic.html +10 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/body_with_attributes.html +3 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/charset_tag.html +11 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/charset_tag_after_x_ua_tag.html +11 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/charset_tag_before_x_ua_tag.html +11 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/charset_tag_with_spaces.html +11 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/comments1.html +24 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/comments2.html +24 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/content_type_charset_tag.html +11 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/content_type_charset_tag_after_x_ua_tag.html +11 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/content_type_charset_tag_before_x_ua_tag.html +11 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/gt_in_quotes1.html +27 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/gt_in_quotes2.html +24 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/gt_in_quotes_mismatch.html +24 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/gt_in_single_quotes1.html +25 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/gt_in_single_quotes_mismatch.html +25 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/head_with_attributes.html +10 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/incomplete_non_meta_tags.html +10 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/no_header.html +7 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/no_html_and_no_header.html +3 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/no_start_header.html +9 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/script1.html +19 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/script2.html +17 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/x_ua_meta_tag.html +10 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/x_ua_meta_tag_multiline.html +11 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/x_ua_meta_tag_spaces_around_equals.html +10 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/x_ua_meta_tag_with_others.html +11 -0
- data/test/fixtures/cross_agent_tests/rum_loader_insertion_location/x_ua_meta_tag_with_spaces.html +10 -0
- data/test/fixtures/cross_agent_tests/sql_parsing.json +55 -0
- data/test/fixtures/cross_agent_tests/url_clean.json +15 -0
- data/test/fixtures/cross_agent_tests/url_domain_extraction.json +35 -0
- data/test/flaky_proxy/README.md +91 -33
- data/test/flaky_proxy/lib/flaky_proxy.rb +1 -0
- data/test/flaky_proxy/lib/flaky_proxy/http_message.rb +2 -0
- data/test/flaky_proxy/lib/flaky_proxy/proxy.rb +19 -4
- data/test/flaky_proxy/lib/flaky_proxy/rule.rb +13 -16
- data/test/flaky_proxy/lib/flaky_proxy/rule_set.rb +10 -2
- data/test/flaky_proxy/lib/flaky_proxy/sequence.rb +14 -0
- data/test/helpers/file_searching.rb +1 -1
- data/test/intentional_fail.rb +1 -1
- data/test/multiverse/lib/multiverse/suite.rb +26 -3
- data/test/multiverse/suites/active_record/Envfile +1 -1
- data/test/multiverse/suites/active_record/ar_method_aliasing.rb +1 -1
- data/test/multiverse/suites/agent_only/audit_log_test.rb +1 -1
- data/test/multiverse/suites/agent_only/collector_exception_handling_test.rb +1 -1
- data/test/multiverse/suites/agent_only/cross_application_tracing_test.rb +1 -1
- data/test/multiverse/suites/agent_only/encoding_handling_test.rb +1 -1
- data/test/multiverse/suites/agent_only/harvest_timestamps_test.rb +1 -1
- data/test/multiverse/suites/agent_only/http_response_code_test.rb +1 -1
- data/test/multiverse/suites/agent_only/key_transactions_test.rb +1 -1
- data/test/multiverse/suites/agent_only/logging_test.rb +1 -1
- data/test/multiverse/suites/agent_only/marshaling_test.rb +1 -1
- data/test/multiverse/suites/agent_only/pipe_manager_test.rb +1 -1
- data/test/multiverse/suites/agent_only/rename_rule_test.rb +1 -1
- data/test/multiverse/suites/agent_only/rum_instrumentation_test.rb +1 -1
- data/test/multiverse/suites/agent_only/service_timeout_test.rb +1 -1
- data/test/multiverse/suites/agent_only/set_transaction_name_test.rb +1 -1
- data/test/multiverse/suites/agent_only/ssl_test.rb +1 -1
- data/test/multiverse/suites/agent_only/start_up_test.rb +1 -1
- data/test/multiverse/suites/agent_only/thread_profiling_test.rb +1 -1
- data/test/multiverse/suites/agent_only/xray_sessions_test.rb +1 -1
- data/test/multiverse/suites/bare/standalone_instrumentation_test.rb +1 -1
- data/test/multiverse/suites/config_file_loading/config_file_loading_test.rb +1 -1
- data/test/multiverse/suites/curb/curb_test.rb +1 -1
- data/test/multiverse/suites/datamapper/datamapper_test.rb +1 -1
- data/test/multiverse/suites/deferred_instrumentation/sinatra_test.rb +1 -1
- data/test/multiverse/suites/excon/excon_test.rb +1 -1
- data/test/multiverse/suites/httpclient/httpclient_test.rb +1 -1
- data/test/multiverse/suites/mongo/helpers/mongo_operation_tests.rb +7 -3
- data/test/multiverse/suites/mongo/mongo_instrumentation_test.rb +1 -1
- data/test/multiverse/suites/mongo/mongo_unsupported_version_test.rb +2 -2
- data/test/multiverse/suites/net_http/net_http_test.rb +1 -1
- data/test/multiverse/suites/padrino/Envfile +1 -1
- data/test/multiverse/suites/padrino/padrino_test.rb +1 -1
- data/test/multiverse/suites/rails/Envfile +10 -0
- data/test/multiverse/suites/rails/request_statistics_test.rb +59 -6
- data/test/multiverse/suites/rails/view_instrumentation_test.rb +1 -0
- data/test/multiverse/suites/resque/instrumentation_test.rb +1 -1
- data/test/multiverse/suites/sequel/sequel_instrumentation_test.rb +5 -18
- data/test/multiverse/suites/sequel/sequel_safety_test.rb +1 -1
- data/test/multiverse/suites/sidekiq/sidekiq_instrumentation_test.rb +1 -1
- data/test/multiverse/suites/sinatra/ignoring_test.rb +1 -1
- data/test/multiverse/suites/sinatra/sinatra_classic_test.rb +1 -1
- data/test/multiverse/suites/sinatra/sinatra_error_tracing_test.rb +1 -1
- data/test/multiverse/suites/sinatra/sinatra_metric_explosion_test.rb +1 -1
- data/test/multiverse/suites/sinatra/sinatra_modular_test.rb +1 -1
- data/test/multiverse/suites/sinatra/sinatra_routes_test.rb +1 -1
- data/test/multiverse/suites/typhoeus/typhoeus_test.rb +36 -2
- data/test/new_relic/FAKECHANGELOG +21 -0
- data/test/new_relic/agent/agent/connect_test.rb +1 -1
- data/test/new_relic/agent/agent/start_test.rb +1 -1
- data/test/new_relic/agent/agent/start_worker_thread_test.rb +1 -1
- data/test/new_relic/agent/agent_logger_test.rb +1 -1
- data/test/new_relic/agent/agent_test.rb +14 -8
- data/test/new_relic/agent/apdex_from_server_test.rb +1 -1
- data/test/new_relic/agent/audit_logger_test.rb +1 -1
- data/test/new_relic/agent/autostart_test.rb +1 -1
- data/test/new_relic/agent/browser_token_test.rb +1 -1
- data/test/new_relic/agent/busy_calculator_test.rb +1 -1
- data/test/new_relic/agent/commands/agent_command_router_test.rb +1 -1
- data/test/new_relic/agent/commands/agent_command_test.rb +1 -1
- data/test/new_relic/agent/commands/thread_profiler_session_test.rb +2 -2
- data/test/new_relic/agent/commands/xray_session_collection_test.rb +1 -1
- data/test/new_relic/agent/commands/xray_session_test.rb +1 -1
- data/test/new_relic/agent/configuration/default_source_test.rb +1 -1
- data/test/new_relic/agent/configuration/environment_source_test.rb +1 -1
- data/test/new_relic/agent/configuration/manager_test.rb +1 -1
- data/test/new_relic/agent/configuration/orphan_configuration_test.rb +1 -1
- data/test/new_relic/agent/configuration/server_source_test.rb +1 -1
- data/test/new_relic/agent/configuration/yaml_source_test.rb +1 -1
- data/test/new_relic/agent/cpu_sampler_test.rb +1 -1
- data/test/new_relic/agent/cross_app_monitor_test.rb +3 -3
- data/test/new_relic/agent/cross_app_tracing_test.rb +1 -1
- data/test/new_relic/agent/database/postgres_explain_obfuscator_test.rb +34 -0
- data/test/new_relic/agent/database_test.rb +192 -5
- data/test/new_relic/agent/datastores/mongo/metric_generator_test.rb +1 -1
- data/test/new_relic/agent/datastores/mongo/metric_translator_test.rb +11 -1
- data/test/new_relic/agent/datastores/mongo/obfuscator_test.rb +1 -1
- data/test/new_relic/agent/datastores/mongo/statement_formatter_test.rb +1 -1
- data/test/new_relic/agent/error_collector/notice_error_test.rb +1 -1
- data/test/new_relic/agent/error_collector_test.rb +1 -1
- data/test/new_relic/agent/event_listener_test.rb +1 -1
- data/test/new_relic/agent/harvester_test.rb +1 -1
- data/test/new_relic/agent/http_clients/uri_util_test.rb +1 -1
- data/test/new_relic/agent/instrumentation/action_controller_subscriber_test.rb +1 -1
- data/test/new_relic/agent/instrumentation/action_view_subscriber_test.rb +1 -1
- data/test/new_relic/agent/instrumentation/active_record_helper_test.rb +4 -4
- data/test/new_relic/agent/instrumentation/active_record_subscriber_test.rb +2 -2
- data/test/new_relic/agent/instrumentation/active_record_test.rb +385 -0
- data/test/new_relic/agent/instrumentation/controller_instrumentation_test.rb +1 -1
- data/test/new_relic/agent/instrumentation/instrumentation_test.rb +1 -1
- data/test/new_relic/agent/instrumentation/metric_frame_test.rb +1 -1
- data/test/new_relic/agent/instrumentation/net_instrumentation_test.rb +1 -1
- data/test/new_relic/agent/instrumentation/queue_time_test.rb +1 -1
- data/test/new_relic/agent/instrumentation/rack_test.rb +1 -1
- data/test/new_relic/agent/instrumentation/sinatra/transaction_namer_test.rb +1 -1
- data/test/new_relic/agent/instrumentation/sinatra_test.rb +1 -1
- data/test/new_relic/agent/instrumentation/task_instrumentation_test.rb +1 -1
- data/test/new_relic/agent/javascript_instrumentor_test.rb +3 -3
- data/test/new_relic/agent/memcache_instrumentation_test.rb +1 -1
- data/test/new_relic/agent/memory_logger_test.rb +1 -1
- data/test/new_relic/agent/method_interrobang_test.rb +1 -1
- data/test/new_relic/agent/method_tracer/class_methods/add_method_tracer_test.rb +1 -1
- data/test/new_relic/agent/method_tracer/instance_methods/trace_execution_scoped_test.rb +1 -1
- data/test/new_relic/agent/method_tracer_test.rb +1 -1
- data/test/new_relic/agent/method_visibility_test.rb +1 -1
- data/test/new_relic/agent/new_relic_service_test.rb +2 -2
- data/test/new_relic/agent/obfuscator_test.rb +1 -1
- data/test/new_relic/agent/pipe_channel_manager_test.rb +216 -143
- data/test/new_relic/agent/pipe_service_test.rb +26 -15
- data/test/new_relic/agent/request_sampler_test.rb +65 -18
- data/test/new_relic/agent/rpm_agent_test.rb +1 -1
- data/test/new_relic/agent/rules_engine_test.rb +1 -1
- data/test/new_relic/agent/sampled_buffer_test.rb +1 -1
- data/test/new_relic/agent/sampler_collection_test.rb +8 -1
- data/test/new_relic/agent/sampler_test.rb +1 -1
- data/test/new_relic/agent/shim_agent_test.rb +3 -3
- data/test/new_relic/agent/sql_sampler_test.rb +7 -6
- data/test/new_relic/agent/stats_engine/gc_profiler_test.rb +1 -1
- data/test/new_relic/agent/stats_engine/metric_stats_test.rb +1 -1
- data/test/new_relic/agent/stats_engine/samplers_test.rb +1 -1
- data/test/new_relic/agent/stats_engine_test.rb +1 -1
- data/test/new_relic/agent/stats_hash_test.rb +1 -1
- data/test/new_relic/agent/stats_test.rb +1 -1
- data/test/new_relic/agent/threading/agent_thread_test.rb +1 -1
- data/test/new_relic/agent/threading/backtrace_node_test.rb +1 -1
- data/test/new_relic/agent/threading/backtrace_service_test.rb +3 -3
- data/test/new_relic/agent/threading/thread_profile_test.rb +1 -1
- data/test/new_relic/agent/transaction/developer_mode_sample_buffer_test.rb +1 -1
- data/test/new_relic/agent/transaction/force_persist_sample_buffer_test.rb +1 -1
- data/test/new_relic/agent/transaction/pop_test.rb +1 -1
- data/test/new_relic/agent/transaction/slowest_sample_buffer_test.rb +1 -1
- data/test/new_relic/agent/transaction/xray_sample_buffer_test.rb +1 -1
- data/test/new_relic/agent/transaction_interrobang_test.rb +1 -1
- data/test/new_relic/agent/transaction_sample_builder_test.rb +1 -1
- data/test/new_relic/agent/transaction_sampler_test.rb +17 -17
- data/test/new_relic/agent/transaction_state_test.rb +61 -6
- data/test/new_relic/agent/transaction_test.rb +60 -3
- data/test/new_relic/agent/transaction_timings_test.rb +1 -1
- data/test/new_relic/agent/vm/monotonic_gc_profiler_test.rb +42 -0
- data/test/new_relic/agent/vm/mri_vm_test.rb +35 -0
- data/test/new_relic/agent/vm/snapshot_test.rb +8 -0
- data/test/new_relic/agent/vm_test.rb +48 -0
- data/test/new_relic/agent/worker_loop_test.rb +1 -1
- data/test/new_relic/agent_test.rb +1 -1
- data/test/new_relic/cli/deployments_test.rb +1 -1
- data/test/new_relic/coerce_test.rb +1 -1
- data/test/new_relic/collection_helper_test.rb +1 -1
- data/test/new_relic/control/class_methods_test.rb +1 -1
- data/test/new_relic/control/frameworks/rails_test.rb +1 -1
- data/test/new_relic/control_test.rb +1 -1
- data/test/new_relic/dependency_detection_test.rb +1 -1
- data/test/new_relic/dispatcher_test.rb +1 -1
- data/test/new_relic/environment_report_test.rb +1 -1
- data/test/new_relic/framework_test.rb +1 -1
- data/test/new_relic/http_client_test_cases.rb +1 -1
- data/test/new_relic/json_wrapper_test.rb +1 -1
- data/test/new_relic/language_support_test.rb +42 -1
- data/test/new_relic/latest_changes_test.rb +45 -0
- data/test/new_relic/license_test.rb +2 -2
- data/test/new_relic/load_test.rb +1 -1
- data/test/new_relic/local_environment_test.rb +1 -1
- data/test/new_relic/metric_data_test.rb +1 -1
- data/test/new_relic/metric_parser/metric_parser_test.rb +1 -1
- data/test/new_relic/metric_spec_test.rb +1 -1
- data/test/new_relic/multiverse_helpers.rb +0 -27
- data/test/new_relic/noticed_error_test.rb +1 -1
- data/test/new_relic/rack/agent_hooks_test.rb +1 -1
- data/test/new_relic/rack/all_test.rb +1 -1
- data/test/new_relic/rack/browser_monitoring_test.rb +2 -2
- data/test/new_relic/rack/deferred_instrumentation_test.rb +1 -1
- data/test/new_relic/rack/developer_mode_helper_test.rb +1 -1
- data/test/new_relic/rack/developer_mode_test.rb +2 -19
- data/test/new_relic/rack/error_collector_test.rb +1 -1
- data/test/new_relic/rack/transaction_reset_test.rb +1 -1
- data/test/new_relic/transaction_analysis/segment_summary_test.rb +1 -1
- data/test/new_relic/transaction_analysis_test.rb +1 -1
- data/test/new_relic/transaction_sample/composite_segment_test.rb +1 -1
- data/test/new_relic/transaction_sample/fake_segment_test.rb +1 -1
- data/test/new_relic/transaction_sample/segment_test.rb +2 -2
- data/test/new_relic/transaction_sample/summary_segment_test.rb +1 -1
- data/test/new_relic/transaction_sample_subtest_test.rb +1 -1
- data/test/new_relic/transaction_sample_test.rb +3 -3
- data/test/new_relic/version_number_test.rb +1 -1
- data/test/performance/lib/performance/instrumentation/stackprof.rb +33 -0
- data/test/performance/lib/performance/platform.rb +1 -0
- data/test/performance/suites/marshalling.rb +2 -1
- data/test/test_helper.rb +33 -3
- data/ui/views/newrelic/index.rhtml +2 -2
- metadata +169 -31
- metadata.gz.sig +0 -0
- data/lib/new_relic/control/profiling.rb +0 -29
- data/test/new_relic/agent/instrumentation/active_record_instrumentation_test.rb +0 -648
@@ -0,0 +1,48 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
5
|
+
require File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
|
6
|
+
require 'new_relic/agent/vm'
|
7
|
+
|
8
|
+
class NewRelic::Agent::VMTestCase < Minitest::Test
|
9
|
+
attr_reader :vm, :snapshot
|
10
|
+
|
11
|
+
def setup
|
12
|
+
@vm = NewRelic::Agent::VM.vm
|
13
|
+
@snapshot = NewRelic::Agent::VM.snapshot
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_gets_snapshot
|
17
|
+
refute_nil snapshot
|
18
|
+
end
|
19
|
+
|
20
|
+
EXPECTED_SNAPSHOT_VALUES = [
|
21
|
+
:gc_runs,
|
22
|
+
:total_allocated_object,
|
23
|
+
:major_gc_count,
|
24
|
+
:minor_gc_count,
|
25
|
+
:heap_live,
|
26
|
+
:heap_free,
|
27
|
+
:method_cache_invalidations,
|
28
|
+
:constant_cache_invalidations,
|
29
|
+
:thread_count
|
30
|
+
]
|
31
|
+
|
32
|
+
EXPECTED_SNAPSHOT_VALUES.each do |val|
|
33
|
+
define_method("test_snapshot_has_#{val}") do
|
34
|
+
assert_correct_value_for(val)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# A VM snapshot will either support a value and have something non-nil,
|
39
|
+
# or it will not support it in which case the method exists but must be nil!
|
40
|
+
def assert_correct_value_for(meth)
|
41
|
+
if vm.supports?(meth)
|
42
|
+
refute_nil snapshot.send(meth)
|
43
|
+
else
|
44
|
+
assert_nil snapshot.send(meth)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
|
6
6
|
|
7
|
-
class NewRelic::Agent::WorkerLoopTest <
|
7
|
+
class NewRelic::Agent::WorkerLoopTest < Minitest::Test
|
8
8
|
def setup
|
9
9
|
@worker_loop = NewRelic::Agent::WorkerLoop.new
|
10
10
|
end
|
@@ -9,7 +9,7 @@ module NewRelic
|
|
9
9
|
# mostly this class just passes through to the active agent
|
10
10
|
# through the agent method or the control instance through
|
11
11
|
# NewRelic::Control.instance . But it's nice to make sure.
|
12
|
-
class MainAgentTest <
|
12
|
+
class MainAgentTest < Minitest::Test
|
13
13
|
include NewRelic::Agent::MethodTracer
|
14
14
|
|
15
15
|
def setup
|
@@ -6,7 +6,7 @@ require File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper
|
|
6
6
|
require 'new_relic/cli/command'
|
7
7
|
require 'new_relic/cli/deployments'
|
8
8
|
|
9
|
-
class NewRelic::Cli::DeploymentsTest <
|
9
|
+
class NewRelic::Cli::DeploymentsTest < Minitest::Test
|
10
10
|
|
11
11
|
def setup
|
12
12
|
NewRelic::Cli::Deployments.class_eval do
|
@@ -7,7 +7,7 @@ require 'ostruct'
|
|
7
7
|
require 'active_record_fixtures' if defined?(::ActiveRecord)
|
8
8
|
|
9
9
|
require 'new_relic/collection_helper'
|
10
|
-
class NewRelic::CollectionHelperTest <
|
10
|
+
class NewRelic::CollectionHelperTest < Minitest::Test
|
11
11
|
|
12
12
|
def setup
|
13
13
|
NewRelic::Agent.manual_start
|
@@ -10,7 +10,7 @@ class BaseClassMethods
|
|
10
10
|
include NewRelic::Control::ClassMethods
|
11
11
|
end
|
12
12
|
|
13
|
-
class NewRelic::Control::ClassMethodsTest <
|
13
|
+
class NewRelic::Control::ClassMethodsTest < Minitest::Test
|
14
14
|
def setup
|
15
15
|
@base = ::BaseClassMethods.new
|
16
16
|
super
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'/../../../test_helper'))
|
6
6
|
|
7
|
-
class NewRelic::Control::Frameworks::RailsTest <
|
7
|
+
class NewRelic::Control::Frameworks::RailsTest < Minitest::Test
|
8
8
|
def test_install_browser_monitoring
|
9
9
|
require 'new_relic/rack/browser_monitoring'
|
10
10
|
middleware = stub('middleware config')
|
@@ -5,7 +5,7 @@
|
|
5
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..', 'test_helper'))
|
6
6
|
|
7
7
|
# Test logic around detecting or configuring dispatcher
|
8
|
-
class DispatcherTest <
|
8
|
+
class DispatcherTest < Minitest::Test
|
9
9
|
|
10
10
|
def setup
|
11
11
|
NewRelic::Agent.shutdown
|
@@ -6,7 +6,7 @@ require File.expand_path(File.join(File.dirname(__FILE__),'..','test_helper'))
|
|
6
6
|
|
7
7
|
require 'new_relic/environment_report'
|
8
8
|
|
9
|
-
class EnvironmentReportTest <
|
9
|
+
class EnvironmentReportTest < Minitest::Test
|
10
10
|
def setup
|
11
11
|
@old_logic = ::NewRelic::EnvironmentReport.registered_reporters.dup
|
12
12
|
@report = ::NewRelic::EnvironmentReport.new
|
@@ -44,7 +44,7 @@ module HttpClientTestCases
|
|
44
44
|
end
|
45
45
|
|
46
46
|
@engine = NewRelic::Agent.instance.stats_engine
|
47
|
-
NewRelic::Agent::
|
47
|
+
NewRelic::Agent::Transaction.any_instance.stubs(:guid).returns(TRANSACTION_GUID)
|
48
48
|
end
|
49
49
|
|
50
50
|
# Helpers to support shared tests
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..','test_helper'))
|
6
6
|
|
7
|
-
class NewRelic::LanguageSupportTest <
|
7
|
+
class NewRelic::LanguageSupportTest < Minitest::Test
|
8
8
|
include ::NewRelic::TestHelpers::RuntimeDetection
|
9
9
|
|
10
10
|
def test_object_space_usable_on_jruby_with_object_space_enabled
|
@@ -23,4 +23,45 @@ class NewRelic::LanguageSupportTest < MiniTest::Unit::TestCase
|
|
23
23
|
return unless rubinius?
|
24
24
|
assert_falsy NewRelic::LanguageSupport.object_space_usable?
|
25
25
|
end
|
26
|
+
|
27
|
+
def test_gc_profiler_unavailable_without_constant
|
28
|
+
undefine_constant(:'GC::Profiler') do
|
29
|
+
assert_equal false, NewRelic::LanguageSupport.gc_profiler_usable?
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_gc_profiler_unavailable_on_jruby
|
34
|
+
return unless jruby?
|
35
|
+
assert_equal false, NewRelic::LanguageSupport.gc_profiler_usable?
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_gc_profiler_disabled_without_constant
|
39
|
+
undefine_constant(:'GC::Profiler') do
|
40
|
+
assert_equal false, NewRelic::LanguageSupport.gc_profiler_enabled?
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
if NewRelic::LanguageSupport.gc_profiler_usable?
|
45
|
+
def test_gc_profiler_disabled_when_enabled_is_falsy
|
46
|
+
::GC::Profiler.stubs(:enabled?).returns(false)
|
47
|
+
assert_equal false, NewRelic::LanguageSupport.gc_profiler_enabled?
|
48
|
+
end
|
49
|
+
|
50
|
+
def test_gc_profiler_enabled
|
51
|
+
::GC::Profiler.stubs(:enabled?).returns(true)
|
52
|
+
assert_equal true, NewRelic::LanguageSupport.gc_profiler_enabled?
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_gc_profiler_enabled_when_response_is_only_truthy
|
56
|
+
::GC::Profiler.stubs(:enabled?).returns(0)
|
57
|
+
assert_equal true, NewRelic::LanguageSupport.gc_profiler_enabled?
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_gc_profiler_disabled_on_jruby
|
62
|
+
return unless defined?(::GC::Profiler) && jruby?
|
63
|
+
|
64
|
+
::GC::Profiler.stubs(:enabled?).returns(true)
|
65
|
+
assert_equal false, NewRelic::LanguageSupport.gc_profiler_enabled?
|
66
|
+
end
|
26
67
|
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
5
|
+
require File.expand_path(File.join(__FILE__,'..','..','test_helper'))
|
6
|
+
|
7
|
+
module NewRelic
|
8
|
+
class LatestChangesTest < MiniTest::Test
|
9
|
+
def setup
|
10
|
+
# 1.8.7 returns relative paths for __FILE__. test:env environment then
|
11
|
+
# can't find the CHANGELOG since current dir is test app instead of gem.
|
12
|
+
#
|
13
|
+
# This doesn't impact production usage of NewRelic::LatestChanges on
|
14
|
+
# the gem post-installation, since that's run in our gem's context. So
|
15
|
+
# just fix up the pathing in the test for finding default changelog.
|
16
|
+
if RUBY_VERSION < '1.9.1'
|
17
|
+
NewRelic::LatestChanges.stubs(:default_changelog).returns(File.join(File.dirname(__FILE__), '..', '..', 'CHANGELOG'))
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_read_default_changelog
|
22
|
+
result = NewRelic::LatestChanges.read
|
23
|
+
assert_match /# New Relic Ruby Agent Release Notes #/, result
|
24
|
+
assert_match /## v\d\.\d\.\d ##/, result
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_latest_changes_from_fakechangelog
|
28
|
+
result = NewRelic::LatestChanges.read(File.join(File.dirname(__FILE__), 'FAKECHANGELOG'))
|
29
|
+
assert_match /3.7.2/, result
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_patch_latest_changes_from_fakechangelog
|
33
|
+
result = NewRelic::LatestChanges.read_patch('3.7.2.4242', File.join(File.dirname(__FILE__), 'FAKECHANGELOG'))
|
34
|
+
expected = <<END
|
35
|
+
## v3.7.2.4242 ##
|
36
|
+
|
37
|
+
* Patch (3.7.2.4242)
|
38
|
+
|
39
|
+
Patch for something
|
40
|
+
END
|
41
|
+
assert_equal expected, result
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
@@ -6,7 +6,7 @@ require File.expand_path(File.join(File.dirname(__FILE__),'..','test_helper'))
|
|
6
6
|
|
7
7
|
# look through the source code to enforce some simple rules that help us keep
|
8
8
|
# our license data up to date.
|
9
|
-
class LicenseTest <
|
9
|
+
class LicenseTest < Minitest::Test
|
10
10
|
include NewRelic::TestHelpers::FileSearching
|
11
11
|
|
12
12
|
# A list of regexs that will likely match license info
|
@@ -26,8 +26,8 @@ class LicenseTest < MiniTest::Unit::TestCase
|
|
26
26
|
# unless listed here the expectation is that these terms will not occur in
|
27
27
|
# the source code.
|
28
28
|
EXPECTED_LICENSE_OCCURRENCES = {
|
29
|
+
['/newrelic_rpm.gemspec', 'MIT'] => 1, # licenses specificiation, which includes MIT for MIT-licensed portions of code
|
29
30
|
['/lib/new_relic/okjson.rb', '(c)'] => 3, # methods arguments like (c)
|
30
|
-
['/test/new_relic/agent/instrumentation/active_record_instrumentation_test.rb', '(c)'] => 2, # methods arguments like (c)
|
31
31
|
['/lib/new_relic/okjson.rb', 'Copyright'] => 3, # okjson license info
|
32
32
|
['/lib/new_relic/timer_lib.rb', '(c)'] => 1, # timer_lib license info
|
33
33
|
['/lib/new_relic/timer_lib.rb', 'Copyright'] => 1, # timer_lib license info
|
data/test/new_relic/load_test.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
require 'resolv'
|
6
6
|
require 'mocha/setup'
|
7
7
|
|
8
|
-
class LoadTest <
|
8
|
+
class LoadTest < Minitest::Test
|
9
9
|
def test_loading_agent_when_disabled_does_not_resolv_addresses
|
10
10
|
::Resolv.expects(:getaddress).never
|
11
11
|
::IPSocket.expects(:getaddress).never
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
4
|
|
5
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..', 'test_helper'))
|
6
|
-
class NewRelic::LocalEnvironmentTest <
|
6
|
+
class NewRelic::LocalEnvironmentTest < Minitest::Test
|
7
7
|
|
8
8
|
def self.teardown
|
9
9
|
# To remove mock server instances from ObjectSpace
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..', 'test_helper'))
|
6
6
|
require 'new_relic/metric_data'
|
7
|
-
class NewRelic::MetricDataTest <
|
7
|
+
class NewRelic::MetricDataTest < Minitest::Test
|
8
8
|
def test_initialize_basic
|
9
9
|
spec = mock('metric_spec')
|
10
10
|
stats = mock('stats')
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
4
|
|
5
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..', '..', 'test_helper'))
|
6
|
-
class NewRelic::MetricParser::MetricParserTest <
|
6
|
+
class NewRelic::MetricParser::MetricParserTest < Minitest::Test
|
7
7
|
class ::AnApplicationClass
|
8
8
|
end
|
9
9
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
4
|
|
5
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..', 'test_helper'))
|
6
|
-
class NewRelic::MetricSpecTest <
|
6
|
+
class NewRelic::MetricSpecTest < Minitest::Test
|
7
7
|
|
8
8
|
def test_equal
|
9
9
|
spec1 = NewRelic::MetricSpec.new('Controller')
|
@@ -129,30 +129,3 @@ module MultiverseHelpers
|
|
129
129
|
|
130
130
|
extend self
|
131
131
|
end
|
132
|
-
|
133
|
-
#if RUBY_VERSION < "1.8.7"
|
134
|
-
# # No instance_exec in 1.8.6... sigh
|
135
|
-
# #
|
136
|
-
# # Cribbed from https://www.ruby-forum.com/topic/72172#101957, most straight
|
137
|
-
# # forward implementation I could find without using ActiveSupport
|
138
|
-
# class Object
|
139
|
-
# unless defined? instance_exec # 1.9
|
140
|
-
# def instance_exec(*arguments, &block)
|
141
|
-
# block.bind(self)[*arguments]
|
142
|
-
# end
|
143
|
-
# end
|
144
|
-
# end
|
145
|
-
#
|
146
|
-
# class Proc
|
147
|
-
# def bind(object)
|
148
|
-
# block, time = self, Time.now
|
149
|
-
# (class << object; self end).class_eval do
|
150
|
-
# method_name = "__bind_#{time.to_i}_#{time.usec}"
|
151
|
-
# define_method(method_name, &block)
|
152
|
-
# method = instance_method(method_name)
|
153
|
-
# remove_method(method_name)
|
154
|
-
# method
|
155
|
-
# end.bind(object)
|
156
|
-
# end
|
157
|
-
# end
|
158
|
-
#end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..','test_helper'))
|
6
6
|
|
7
|
-
class NewRelic::Agent::NoticedErrorTest <
|
7
|
+
class NewRelic::Agent::NoticedErrorTest < Minitest::Test
|
8
8
|
include NewRelic::TestHelpers::Exceptions
|
9
9
|
|
10
10
|
def setup
|
@@ -5,7 +5,7 @@
|
|
5
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
|
6
6
|
require 'new_relic/rack/browser_monitoring'
|
7
7
|
require 'new_relic/rack/developer_mode'
|
8
|
-
class NewRelic::Rack::AllTest <
|
8
|
+
class NewRelic::Rack::AllTest < Minitest::Test
|
9
9
|
# just here to load the files above
|
10
10
|
|
11
11
|
def test_truth
|
@@ -10,7 +10,7 @@ require 'new_relic/rack/browser_monitoring'
|
|
10
10
|
|
11
11
|
ENV['RACK_ENV'] = 'test'
|
12
12
|
|
13
|
-
class BrowserMonitoringTest <
|
13
|
+
class BrowserMonitoringTest < Minitest::Test
|
14
14
|
include Rack::Test::Methods
|
15
15
|
|
16
16
|
class TestApp
|
@@ -170,7 +170,7 @@ EOL
|
|
170
170
|
|
171
171
|
def test_guid_is_set_in_footer_when_token_is_set
|
172
172
|
guid = 'abcdefgfedcba'
|
173
|
-
NewRelic::
|
173
|
+
NewRelic::Agent::Transaction.any_instance.stubs(:guid).returns(guid)
|
174
174
|
set_cookie "NRAGENT=tk=token"
|
175
175
|
with_config(:apdex_t => 0.0001) do
|
176
176
|
get '/'
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
|
6
6
|
|
7
|
-
class NewRelic::Rack::DeferredInstrumentationTest <
|
7
|
+
class NewRelic::Rack::DeferredInstrumentationTest < Minitest::Test
|
8
8
|
class TestApp
|
9
9
|
def call(env)
|
10
10
|
[200, {}, ["whatever"]]
|