feat: integration test metrics#57
Merged
Merged
Conversation
…vements - Add SpringMetricsUtils and GlueSync metrics integration tests - Move integration test support classes into .support sub-package - Replace race-prone await on DummyListener with Kafka fetch metric guard + awaitOffsetCommitted via AdminClient for reliable sync - DummyListener: ArrayList → CopyOnWriteArrayList (JMM data race fix) - DroneFly: remove ApplicationContextAware and static context field to prevent Spring test context clobbering - AsyncApplicationRunner: log runner failures instead of swallowing - DroneFlyIntegrationTest: remove dead records/container infrastructure - SpringMetricsUtils.metricValue: replace manual URI string-building with UriComponentsBuilder (fixes trailing & and silent tag-skip) - Add .editorconfig, update .sdkmanrc to JDK 21 - Pin apiary.extensions.version to stable 8.2.0 (was SNAPSHOT) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
abhimanyugupta07
approved these changes
Jun 26, 2026
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.
Summary
ApiaryGlueSyncMetricsIntegrationTestgains four tests that verify GlueSync counters are exported via the actuator metrics and Prometheus endpoints, that counters incrementcorrectly on events, and that failure counters fire when the Glue API is unreachable.
DroneFlyIntegrationTest.typical()now waits for the Kafka consumer to commit its offset (viaAdminClient) before asserting listener state, replacing the previouspolling on
DummyListener.getNumEvents()which could race with dispatch. AspringMetricsIncreaseguard also confirms the fetch metric incremented first.DummyListener.notifyListchanged fromArrayListtoCopyOnWriteArrayList; the runner thread writes and the test thread reads/clears without synchronisation.DummyListener,DroneFlyIntegrationTestUtils,SpringMetricsUtils,AsyncApplicationRunner,AsyncRunnerConfig) moved to a.supportsub-package.DroneFlyno longer implementsApplicationContextAwareor holds a staticApplicationContextfield, which prevented proper isolation between@SpringBootTestcontexts.AsyncApplicationRunnerlogsfailures instead of silently swallowing them.
.editorconfigadded,.sdkmanrcupdated to JDK 21 (matchingmaven.compiler.release=21),apiary.extensions.versionpinned to stable8.2.0.Test plan
DroneFlyIntegrationTest#typical— passes locally (verified)drone-fly-integration-testsmodule —mvn test -pl drone-fly-integration-testsdrone-fly-appafterApplicationContextAwareremoval