-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
retrieveLogsAndClear works in constant space #2
base: master
Are you sure you want to change the base?
retrieveLogsAndClear works in constant space #2
Conversation
Thanks for the contribution @tau3! There's a constraint by Cloudwatch that log events must be ordered sequentially by timestamp. |
oh, i thought the queue was naturally ordered. PR will improved then) |
It's a concurrent queue being written to by many producers. Take for example an application server servicing multiple users concurrently on different worker threads. |
… ConcurrentLinkedQueue
@oluwasayo please, check |
The test still fails. You can run the test locally on your computer with |
i think there are some problems with unit test. junit does not guarantee execution order of unit tests, so relying on "append" test running before "retrieveLogsAndClear" is a mistake. depending on configuration, they can even be executed in separate VMs. also making one test depend on results of another is a bad practice imo |
You're absolutely right about test ordering (at least in most common cases), although that wasn't the reason the tests failed. |
No description provided.