Skip to content
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

[7.x] Adding unit tests for publisher output (#17460) #17625

Merged
merged 1 commit into from
Apr 14, 2020

Conversation

ycombinator
Copy link
Contributor

Backports the following commits to 7.x:

@ycombinator ycombinator added [zube]: In Review backport Team:Services (Deprecated) Label for the former Integrations-Services team labels Apr 8, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

@andresrc andresrc added [zube]: Inbox [zube]: In Review and removed Team:Services (Deprecated) Label for the former Integrations-Services team [zube]: In Review [zube]: Inbox labels Apr 13, 2020
@ycombinator ycombinator force-pushed the backport/7.x/pr-17460 branch from 52dda1d to 676c5d7 Compare April 14, 2020 11:45
* Adding unit tests for publisher output

* Adding another unit test (TODO)

* Adding unit test for closing worker midway

* Reorganizing imports

* Output PRNG seed + provide flag to specify seed

* Cancel batch with netClient if it is closed

* Use waitUntil loop instead of hard sleep

* Making mockClient threadsafe

* Removing goroutine from happy path unit test

* Using testing/quick

* Increase batch sizes in tests

* Adding sleep to ensure some batches are still at time of close

* Experiment witht with slihigher sleep time

* Moving sleep to publish time

* Increase publish latency

* Increasing publish latency again

* Removing publishLatency

* Fix timeout to large value

* Make first client block after publishing X events

* Actually block publishing

* Reduce number of batches to prevent running out of memory

* Bumping up # of batches

* Bumping up # of batches again

* Try different strategy - publish 80% of events

* Cranking up sleep time in publish blocking

* Only publish first 20% of events

* Make sure to return batch for retrying

* Adding debugging statements to see what's happening in Travis

* More robust to race conditions

* Restricting quick iterations to 50 to see if that helps in Travis

* Put entire loop into goroutine

* Renaming tests

* Emulate blocking + mockable publish behavior

* Removing retry and return

* Clarify intent with comment

* Setting # of quick iterations to 25
@ycombinator ycombinator force-pushed the backport/7.x/pr-17460 branch from 676c5d7 to 430c358 Compare April 14, 2020 13:35
@ycombinator
Copy link
Contributor Author

CI test failures are unrelated. Merging.

@ycombinator ycombinator merged commit ec1c767 into elastic:7.x Apr 14, 2020
@ycombinator ycombinator deleted the backport/7.x/pr-17460 branch April 14, 2020 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants