-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix mockbeat stop functionality (#40619)
* Refactor mockbeat Stop into two functions: * `stopNonsynced`: performs the actual stop logic * `Stop`: synchronizes the `stop` function, allowing usage within methods that have already acquired the `cmdMutex` * Implement wait logic in `stopNonsynced` to ensure the beat process fully stops before proceeding. This relies on the `"beatName stopped."` log message for confirmation. * Remove the `time.Sleep` workaround from `./libbeat/tests/integration/http_test.go`, which was previously necessary due to incomplete beat stopping between tests.
- Loading branch information
Showing
3 changed files
with
49 additions
and
25 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
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