Skip to content

Commit

Permalink
make transport spec more stable as msgpack event size has increased
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Dec 3, 2024
1 parent d3adbe0 commit a5a8d1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions lib/datadog/ci/transport/event_platform_transport.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ def send_events(events)

responses = []

p "ENCODED EVENTS SIZE #{encoded_events.size}"
Datadog::Core::Chunker.chunk_by_size(encoded_events, max_payload_size).map do |chunk|
encoded_payload = pack_events(chunk)
p "CHUNK ENCODED PAYLOAD SIZE #{encoded_payload.size}"
Datadog.logger.debug do
"[#{self.class.name}] Send chunk of #{chunk.count} events; payload size #{encoded_payload.size}"
end
Expand Down
4 changes: 2 additions & 2 deletions spec/datadog/ci/test_visibility/transport_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@
end

context "when chunking is used" do
# one test event is approximately 1000 bytes currently
# one test event is approximately 1200 bytes currently
# ATTENTION: might break if more data is added to test spans in #produce_test_trace method
let(:max_payload_size) { 2000 }
let(:max_payload_size) { 2500 }

it "sends events in two chunks" do
responses = subject
Expand Down

0 comments on commit a5a8d1c

Please sign in to comment.