Skip to content

Commit

Permalink
Merge pull request #915 from DataDog/bug/sync-writer-stop
Browse files Browse the repository at this point in the history
Add SyncWriter#stop method
  • Loading branch information
delner authored Jan 10, 2020
2 parents 0a2bb4a + 1c1af27 commit f9408eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/ddtrace/sync_writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ def write(trace, services = nil)
Logger.log.debug(e)
end

# Added for interface completeness
def stop
# No cleanup to do for the SyncWriter
true
end

private

def perform_concurrently(*tasks)
Expand Down
5 changes: 5 additions & 0 deletions spec/ddtrace/sync_writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@
end
end

describe '#stop' do
subject(:stop) { sync_writer.stop }
it { is_expected.to eq(true) }
end

describe 'integration' do
context 'when initializing a tracer' do
subject(:tracer) { Datadog::Tracer.new(writer: sync_writer) }
Expand Down

0 comments on commit f9408eb

Please sign in to comment.