-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up runtime manager test initialization (#3150)
The runtime manager uses a mysterious lookup table, `waitReady`, that is injected into the TLS authentication callbacks to allow a special list of unregistered components to connect. However this turns out to only ever be used by the unit tests for a single connection, which itself is only used to probe whether the RPC server is listening yet. This can be done more simply by just setting an atomic flag when the server loop starts, so this PR does that and removes the extra synchronization baggage. Has no functional effect except when using the unit test helper `waitForReady`, and should effectively still be a no-op there (just with fewer redundant network connections). ## Checklist - [x] My code follows the style guidelines of this project - [x] I have commented my code, particularly in hard-to-understand areas - [ ] ~~I have made corresponding changes to the documentation~~ - [ ] ~~I have made corresponding change to the default configuration files~~ - [ ] ~~I have added tests that prove my fix is effective or that my feature works~~ - [ ] ~~I have added an entry in `./changelog/fragments` using the [changelog tool](https://github.com/elastic/elastic-agent#changelog)~~ - [ ] ~~I have added an integration test or an E2E test~~
- Loading branch information
Showing
2 changed files
with
34 additions
and
106 deletions.
There are no files selected for viewing
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
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