-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Limit batch size to 500kb #147
Conversation
Codecov Report
@@ Coverage Diff @@
## master #147 +/- ##
==========================================
+ Coverage 98.76% 98.81% +0.04%
==========================================
Files 11 11
Lines 405 422 +17
==========================================
+ Hits 400 417 +17
Misses 5 5
Continue to review full report at Codecov.
|
Since builds run in parallel, the e2e tests sometimes fail because their runscope messages are pushed down by other builds. We currently test against 7 ruby versions, and a maximum of 2 builds are triggered per PR (push + PR build). Checking 20 items should be sufficient to handle this workload.
ba8a086
to
c8cf2f1
Compare
The assertion in the thread wouldn't trigger if the test exited first.
Tested with the following script: require 'segment/analytics'
analytics = Segment::Analytics.new({write_key: 'testkey'})
large_message = {
properties: {a: 'b' * 30000},
user_id: 'abcd',
event: 'abcd'
}
50.times { analytics.track(large_message) }
analytics.flush (Run locally using On
On this branch, the code executes successfully with no error. With some debug logs, here's how the result looks:
|
Ready for review. Please merge #143 first though, this diff includes changes from that PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
690fcea
to
ffbe680
Compare
#144
Includes changes from #143.