Get your own customer support community
 

Getting failures when running unit tests.

When I run the unit tests (either via my suite, or via the rake test:agent task), I get the following failures:

1) Failure:
test_add_method_tracer(NewRelic::Agent::MethodTracerTests)
[./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:97:in `test_add_method_tracer'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<false> is not true.

2) Failure:
test_add_multiple_tracers(NewRelic::Agent::MethodTracerTests)
[./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:270:in `method_to_be_traced'
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:243:in `test_add_multiple_tracers'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<"Y"> expected but was
<nil>.

3) Failure:
test_add_same_tracer_twice(NewRelic::Agent::MethodTracerTests)
[./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:270:in `method_to_be_traced'
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:154:in `test_add_same_tracer_twice'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<"metric"> expected but was
<nil>.

4) Failure:
test_add_tracer_with_dynamic_metric(NewRelic::Agent::MethodTracerTests)
[./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:270:in `method_to_be_traced'
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:169:in `test_add_tracer_with_dynamic_metric'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<"1.2"> expected but was
<nil>.

5) Error:
test_basic(NewRelic::Agent::MethodTracerTests):
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.name
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:85:in `test_basic'
./vendor/plugins/newrelic_rpm/lib/newrelic/shim_agent.rb:13:in `trace_method_execution'
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:83:in `test_basic'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'

6) Failure:
test_exception(NewRelic::Agent::MethodTracerTests)
[./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:236:in `test_exception'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<false> is not true.

7) Failure:
test_method_traced?(NewRelic::Agent::MethodTracerTests)
[./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:113:in `test_method_traced?'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<false> is not true.

8) Failure:
test_nested_scope_tracer(NewRelic::Agent::MethodTracerTests)
[./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:141:in `test_nested_scope_tracer'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<2> expected but was
<0>.

9) Error:
test_trace_method_with_block(NewRelic::Agent::MethodTracerTests):
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.name
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:281:in `method_with_block'
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:181:in `test_trace_method_with_block'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'

10) Error:
test_trace_module_method(NewRelic::Agent::MethodTracerTests):
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.name
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:55:in `module_method_to_be_traced'
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:193:in `test_trace_module_method'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'

11) Failure:
test_tt_only(NewRelic::Agent::MethodTracerTests)
[./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_method_tracer.rb:126:in `test_tt_only'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<nil> expected to not be nil.

12) Failure:
test_multiple_samples(NewRelic::Agent::TransationSamplerTests)
[./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_transaction_sampler.rb:24:in `test_multiple_samples'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<4> expected but was
<0>.

13) Error:
test_disable_sql(NewRelic::TransationSampleTests):
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.prepare_to_send
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_transaction_sample.rb:58:in `test_disable_sql'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'

14) Failure:
test_disable_tt(NewRelic::TransationSampleTests)
[./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_transaction_sample.rb:73:in `test_disable_tt'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run']:
<nil> is not true.

15) Error:
test_record_sql_obfuscated(NewRelic::TransationSampleTests):
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.prepare_to_send
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_transaction_sample.rb:112:in `test_record_sql_obfuscated'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'

16) Error:
test_record_sql_off(NewRelic::TransationSampleTests):
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.prepare_to_send
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_transaction_sample.rb:82:in `test_record_sql_off'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'

17) Error:
test_record_sql_raw(NewRelic::TransationSampleTests):
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.prepare_to_send
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_transaction_sample.rb:95:in `test_record_sql_raw'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'

18) Error:
test_sql(NewRelic::TransationSampleTests):
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.prepare_to_send
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_transaction_sample.rb:31:in `test_sql'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'

19) Error:
test_sql_throw(NewRelic::TransationSampleTests):
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.prepare_to_send
./vendor/plugins/newrelic_rpm/test/newrelic/agent/tc_transaction_sample.rb:130:in `test_sql_throw'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
./vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'

</nil></nil></false></false></nil></nil></nil></false>
 
sad I’m frustrated
Inappropriate?
1 person has this question

User_default_medium