This repository has been archived by the owner on Sep 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Add blocking on the first event in the batch #91
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also: * changed the queue wrapper to support blocking `Publish` and non-blocking `TryPublish`. * removed returning `ErrQueueIsFull` from `Publish` since it was incorrect (`Publish` is blocking until the queue is available). * Added context to `Publish` for future change in libbeat (adding `cancel` channel to each producer. * Fix flaky timestamp error check
rdner
commented
Aug 12, 2022
@@ -240,15 +230,15 @@ func TestPublish(t *testing.T) { | |||
status, ok := status.FromError(err) | |||
require.True(t, ok, "expected gRPC error") | |||
require.Equal(t, codes.InvalidArgument, status.Code()) | |||
require.Equal(t, tc.expectedMsg, status.Message()) | |||
require.Contains(t, status.Message(), tc.expectedMsg) |
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.
This is to fix #90 (comment)
LGTM, I'll let @faec approve this one |
cmacknz
approved these changes
Aug 15, 2022
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.
Approving so we can get the tests fixed with the change to ignore the randomness in the Timestamp errors: https://github.com/elastic/elastic-agent-shipper/pull/91/files#r944769758
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Also:
Publish
andnon-blocking
TryPublish
.ErrQueueIsFull
fromPublish
since it wasincorrect (
Publish
is blocking until the queue is available).Publish
for future change in libbeat (addingcancel
channel to each producer.For more details see #84 (comment)
Closes #84