Port LoggingTest improvements from #2087.#2126
Open
Dimi1010 wants to merge 1 commit intoseladb:devfrom
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #2126 +/- ##
========================================
Coverage 82.68% 82.68%
========================================
Files 332 332
Lines 59696 59720 +24
Branches 12306 12382 +76
========================================
+ Hits 49359 49380 +21
- Misses 9014 9477 +463
+ Partials 1323 863 -460
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two main ported improvements from the standalone logger test executable:
Replacement of global mock objects.
This change replaces the global mock singletons
LogPrinterandMultiThreadLogCounterwith regular instance based mocks. The original reason for the mocks being global singletons no longer applies as the logger callback can be a lambda instead of a raw function pointer. The change allows the mock classes to be simplified.Improved multithreaded test parameterization.
The old implementation relied on hardcoded 1000 messages per
printLogThreadcall. The new implementation parameterizes that intonumMessagesparameter, allowing the number to be specified at call time.The thread count is also now specified at the test call site instead of relying on
MultiThreadLogCounter::ThreadCount.