Move most of the remaining tests to Test Containers as well#1785
Open
siri-varma wants to merge 19 commits into
Open
Move most of the remaining tests to Test Containers as well#1785siri-varma wants to merge 19 commits into
siri-varma wants to merge 19 commits into
Conversation
…acy CI Migrates the last 7 sdk-tests ITs off the dapr-run CLI harness onto BaseContainerIT/DaprContainer so the build job can drop the Dapr CLI, dapr init/uninstall, host Kafka, and host ToxiProxy setup. Covers the app-restart, sidecar-restart, multi-sidecar failover, ToxiProxy, and Kafka mechanics, plus CI and dead-code cleanup. Addresses dapr#1522. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
…eck invariant, reminder client, explicit YAML cleanup Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
… type name Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
…ecar helper) Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
…cement/scheduler) Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Every migrated actor IT attaches daprd to the JVM-wide shared Network. The builder previously used withReusablePlacement(true); with Testcontainers reuse disabled (as on CI), DaprContainer.configure() auto-creates a placement + scheduler per daprd instance -- each claiming the "placement"/"scheduler" network alias and never stopped (no stop() override). Multiple containers answering one alias make Docker DNS round-robin daprd to an arbitrary/empty control plane, so multi-sidecar failover (ActorReminderFailoverIT) and post-restart reminder recovery (ActorReminderRecoveryIT) hit a placement that never saw the actor-host registrations -> "did not find address for actor" / reminder not resumed. Introduce JVM-singleton placement()/scheduler() in SharedTestInfra on the shared network and wire every daprd to them via withPlacementContainer/ withSchedulerContainer. Exactly one container answers each alias, so DNS resolves deterministically; this also eliminates the per-daprd control-plane container leak. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
These were working documents for the Testcontainers migration and are not part of the shipped SDK; dropping them from the PR. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
The http tracing test app's Spring @bean OpenTelemetryConfig.initOpenTelemetry() called the legacy io.dapr.it.tracing.OpenTelemetry.createOpenTelemetry(SERVICE_NAME) overload, which runs waitForZipkin() -> NetworkUtils.waitForSocket(127.0.0.1, 9411). After the Testcontainers migration Zipkin runs on a random mapped host port, not a fixed 9411, so that probe threw ConnectException, bean creation failed, the app subprocess never bound its port, and startAppAndAttach reported connection refused. Switch to the two-arg createOpenTelemetry(SERVICE_NAME, url) overload that skips the probe. The app exports no spans the test asserts on -- the validated calllocal/tracing-http-it/sleep span is emitted by the Dapr sidecar, which exports to Zipkin over the container network -- so the app only needs to boot. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
…g config The prior "Optimize docs" commit switched the job to javadoc:aggregate, but that goal does not apply the pom's <reporting> configuration -- additionalDependencies (spring-data-commons/keyvalue) and excludePackageNames -- so aggregate Javadoc fails to resolve spring-data symbols (TypeInformation, PropertyPath) and the build errors out. Revert the step to site-deploy, which runs Javadoc as a site report so that config applies. The actual speedup is unchanged: <inherited>false> on the aggregate report (in the same "Optimize docs" commit) stops the report re-executing once per reactor module -- the source of the ~32 min runtime -- so it now runs a single aggregate pass. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
siri-varma
commented
Jul 10, 2026
| <!-- Aggregate is a root-only report. Without inherited=false the site | ||
| lifecycle re-runs it at every reactor module, multiplying a full-source | ||
| Javadoc pass ~10x. Keep it pinned to the aggregator module. --> | ||
| <inherited>false</inherited> |
Contributor
Author
There was a problem hiding this comment.
@javier-aliaga / @cicoyle Please double check this change.
We are able to save 30 mins because of this change. It was taking 32 mins before now just takes 4 mins
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1785 +/- ##
============================================
+ Coverage 77.02% 77.06% +0.04%
Complexity 2324 2324
============================================
Files 245 245
Lines 7198 7198
Branches 760 760
============================================
+ Hits 5544 5547 +3
+ Misses 1288 1285 -3
Partials 366 366 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@javier-aliaga need one review on this pr please |
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
Finishes migrating the
sdk-testsintegration tests off the legacydapr runCLI harness and onto Testcontainers (BaseContainerIT/DaprContainer), and strips the now-unused legacy setup from thebuildCI job. This removes the slow, flaky host-daprdpath that was driving thebuild sb:3.5.xjob toward its timeout.What changed
Test migration (last legacy ITs → Testcontainers)
ActorReminderRecoveryIT,ActorReminderFailoverIT,WaitForSidecarIT,BindingIT(now Testcontainers Kafka + in-code bindings), andActorSdkResiliencyIT(moved offToxiProxyRun; still@Disabled).BaseContainerIT:startAppAndAttach(app subprocess + pinned-portdaprd),restartApp/restartSidecar,waitForActorsReady, andnewToxiproxy(Testcontainers ToxiProxy for network-fault injection — replaces the host-installed binary; same toxics, now hermetic and version-pinned).SharedTestInfra: one DockerNetwork+ JVM-singleton Redis / Zipkin / Mongo / Kafka.Actor IT flakiness fix — shared control plane (DNS-alias collision)
daprdto the JVM-wide sharedNetwork. The builder usedwithReusablePlacement(true); with Testcontainers reuse disabled (as on CI),DaprContainer.configure()auto-creates a placement and scheduler perdaprdinstance — each claiming theplacement/schedulernetwork alias and never stopped (nostop()override). Multiple containers answering one alias make Docker DNS round-robindaprdto an arbitrary/empty control plane, so multi-sidecar failover (ActorReminderFailoverIT) and post-restart reminder recovery (ActorReminderRecoveryIT) hit a placement that never saw the actor-host registrations →did not find address for actor/ reminders not resumed.placement()/scheduler()inSharedTestInfraon the shared network, wired into everydaprdviawithPlacementContainer/withSchedulerContainer. Exactly one container answers each alias, so DNS resolves deterministically; this also removes the per-daprdcontrol-plane container leak.CI cleanup
dapr init, host Kafka, and host ToxiProxy setup from thebuildjob.dapr runharness, binding YAMLs, andlocal-test.yml.Issue reference
Closes #1522
Test results
ActorReminderRecoveryIT(4/4) andActorReminderFailoverIT(1/1), which failed deterministically before the fix, now pass both in isolation and in the full suite.tracing.http.TracingIT: fixed. Its Spring@Beanapp eagerly called the legacyOpenTelemetry.createOpenTelemetry(SERVICE_NAME)overload, which probes a fixed127.0.0.1:9411for Zipkin readiness. After this migration Zipkin runs as a Testcontainer on a random mapped host port, so the probe threwConnectException, the app subprocess crashed before binding its port, andstartAppAndAttachreported "connection refused". Switched the bean to the explicit-endpoint overload that skips the probe (the app exports no spans the test asserts on — the validatedcalllocal/tracing-http-it/sleepspan is emitted by the sidecar over the container network). Passes in isolation.sdk-testssuite (local): 7 → 1 error. All four actor errors resolved by the control-plane fix;TracingIT.httpresolved by the bean fix above.spring.messaging.DaprSpringMessagingIT) is a topic-subscription readiness timeout. It reproduces even in isolation and is independent of this PR — it is a standalone@SpringBootTestthat manages its own container and touches none of the code changed here. It appears environment-sensitive on a local macOS Docker host (useshost.testcontainers.internal); CI on this PR is the arbiter for whether it affects the target environment. Tracked as follow-up, not introduced here.Checklist