test/instrumentation/excon_test.rb in instana-1.195.3 vs test/instrumentation/excon_test.rb in instana-1.195.4
- old
+ new
@@ -20,11 +20,11 @@
Excon.defaults[:middlewares].delete ::Excon::Middleware::Mock
url = "http://127.0.0.1:6511"
connection = Excon.new(url)
- Instana.tracer.start_or_continue_trace('excon-test') do
+ Instana.tracer.start_or_continue_trace(:'excon-test') do
connection.get(:path => '/?basic_get')
end
spans = ::Instana.processor.queued_spans
assert_equal 3, spans.length
@@ -144,7 +144,21 @@
refute_nil excon_span[:p]
grandparent_span = find_span_by_id(spans, excon_span[:p])
assert_nil grandparent_span[:p]
assert_equal :sdk, grandparent_span[:n]
end
+ end
+
+ def test_basic_get_no_tracing
+ clear_all!
+
+ # A slight hack but webmock chokes with pipelined requests.
+ # Delete their excon middleware
+ Excon.defaults[:middlewares].delete ::WebMock::HttpLibAdapters::ExconAdapter
+ Excon.defaults[:middlewares].delete ::Excon::Middleware::Mock
+
+ url = "http://127.0.0.1:6511"
+
+ connection = Excon.new(url)
+ connection.get(:path => '/?basic_get')
end
end