From a0b02dcaf70306cab29a37cdd7740241b91fcd85 Mon Sep 17 00:00:00 2001 From: "Christian Mauduit (DataDog)" Date: Fri, 9 Jun 2017 15:42:36 -0400 Subject: [PATCH] [test] fixed test tooling --- test/concurrent_test.rb | 2 +- test/helper.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/concurrent_test.rb b/test/concurrent_test.rb index 3afb01db70a..d21c915aaba 100644 --- a/test/concurrent_test.rb +++ b/test/concurrent_test.rb @@ -12,7 +12,7 @@ def traced_task # and the instant the root span is done. sleep delay end - @tracer.writer.spans() + @tracer.writer.trace0_spans() end def test_parallel_tasks diff --git a/test/helper.rb b/test/helper.rb index b7b3b2bdfa5..30e9f42a497 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -81,6 +81,14 @@ def spans spans.flatten end + def trace0_spans + return [] unless @spans + return [] if @spans.empty? + spans = @spans[0] + @spans = @spans[1..@spans.size] + spans + end + def services services = @services @services = []