test: unit tests for the least covered core packages (metrics, ack, misc helpers) - #219
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
test: unit tests for the least covered core packages (metrics, ack, misc helpers)#219devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
| @Test | ||
| @DisplayName("Should delegate value writing") | ||
| void shouldDelegateWriteValue() throws IOException { | ||
| ByteBufOutputStream out = new ByteBufOutputStream(buffer); |
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.
Description
JaCoCo run over the full
netty-socketio-coresuite (all 113 test classes, Docker/Testcontainers included) showed these packages/classes as the weakest, ignoring the Redis stream/reliable stores which have no test class matching the surefire**/*Test.javainclude (DistributedRedissonClusterSuite):metricspackageMicrometerSocketIOMetrics99.3%)ackpackageAckManager91%,AckSchedulerKey/AckEntry100%)BroadcastAckCallback/AckCallback/VoidAckCallback/MultiTypeAckCallbackBroadcastAckCallback95.7%)MultiTypeArgsJsonSupportWrapperHandshakeDataWrongUrlHandlerstore.event.PublishConfig/PublishMode/EventStoreTypelistener.ExceptionListenerAdapter/DefaultExceptionListenerNo production code was touched; JaCoCo was only wired in locally for measurement and is not part of this diff.
Type of Change
Changes Made
ack/AckManagerTest— ack index allocation (registerAckreturnsinitAckIndex-relative indexes), single vs.MultiTypeAckCallbackdispatch ononAck, timeout scheduling/cancellation andonDisconnecttiming out pending callbacks, using a recordingCancelableSchedulerstub that can fire scheduled callbacks manuallyack/AckSchedulerKeyTest—equals/hashCodeacross differing type, session and index, including inequality with the plainSchedulerKeymetrics/MicrometerSocketIOMetricsTest— counters/timers/gauges against aSimpleMeterRegistry, empty namespace mapped todefault, non-positive durations not recorded, room members gauge clamped at 0, factory + noop implementationmetrics/NamespaceMetersTest— meter registration and the periodic (5s) publish window of the unknown-event-name HLL estimateAckCallbackTest— callback hierarchy plusMultiTypeArgsout-of-bounds-safe accessors and theBroadcastAckCallbackloopFinished()/counter interplay that gatesonAllSuccessJsonSupportWrapperTest,HandshakeDataTest,handler/WrongUrlHandlerTest(viaEmbeddedChannel: 400 + release + close),store/event/PublishConfigTest,listener/ExceptionListenerTestTesting
mvn test76 new tests, all green locally with checkstyle/PMD/license checks enabled.
Link to Devin session: https://app.devin.ai/sessions/727bd5be6dd5437caf53f6ff46651322
Requested by: @sanjomo