[Phase 1] Fix Flaky Integration Tests + Migrate some tests to Test Containers#1754
[Phase 1] Fix Flaky Integration Tests + Migrate some tests to Test Containers#1754siri-varma wants to merge 48 commits into
Conversation
Port the BookTrip compensation (Saga) workflow from the plain Java examples into the Spring Boot workflow patterns module, adding @Component-annotated activities and a /wfp/compensation REST endpoint. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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>
Spec for migrating 13 sdk-tests integration tests from the dapr-run based BaseIT/DaprRun/AppRun harness to Testcontainers via DaprContainer. Captures architecture, startup ordering, per-IT plan, CI changes, and the 8 non-migrated ITs that stay on DaprRun. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
- Move ActorStateIT out of migration list (it's a sidecar-restart test). Migration count: 12 logical ITs / 13 files (9 non-migrated). - Add D9: per-class @BeforeAll lifecycle for all migrated ITs, with TracingIT mitigation (per-test trace IDs). - Add D10: each migrated IT subclass owns its own static DaprContainer + AppRun fields; BaseContainerIT provides helpers only, no fields. - Reconcile IT counts throughout (12 logical, 13 files migrated, 9 non-migrated, 22 total). Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
19-task plan covering: SharedTestInfra + BaseContainerIT foundation, AppRun port-override overload, 13 IT migrations (5 easy + 4 actor + 2 method-invoke + 2 tracing), CI compose-up trim, and push/observe. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
- Define final startAppAndAttach signature (returning DaprAndApp record) directly in Task 3 instead of refactoring it in Task 9. - Drop the startApp tombstone that threw UnsupportedOperationException. - Drop the unused newActorClient(dapr, ResiliencyOptions) overload — no migrated actor IT calls it (ActorSdkResiliencyIT is non-migrated). - Fix Task 15's Configuration constructor: it takes 3 args (name, tracing, appHttpPipeline); pass null for the last. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Provides a JVM-wide Network and lazy Redis container shared across all migrated integration tests. Uses withReuse(true) for dev-loop speed. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Lets BaseContainerIT point the spawned app subprocess at a Testcontainer DaprContainer's mapped HTTP/gRPC ports. Existing callers untouched. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
- Add Apache 2.0 license header to new files (matches package convention). - Change AppRun's new constructor overrides from Integer to int to remove NPE risk on a package-private API. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
BaseContainerIT lives in io.dapr.it.containers and Java packages are not hierarchical, so the constructor needs public visibility to be callable from the sub-package. Caught during Task 3 implementation. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Provides daprBuilder, startAppAndAttach (returning DaprAndApp record), newDaprClient(dapr), Component factories, and @afterall cleanup. Each subclass owns its own static DaprContainer + AppRun fields (D10 from the spec). Smoke test boots a no-component DaprContainer to verify the helper plumbing end-to-end. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Document the single-thread JUnit lifecycle assumption on the cleanup deques, clarify withReusablePlacement vs SharedTestInfra's withReuse, and distinguish the two deferStop overloads. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
dc20276 to
280c572
Compare
Boots Dapr via DaprContainer with secretstores.local.file pointing at a JSON payload generated in-memory and injected via withCopyToContainer (Transferable.of). No host file involvement. Drops initSecretFile/clearSecretFile/LOCAL_SECRET_FILE_PATH — workarounds for the old DaprRun harness writing to a shared host file. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Replaces double-brace HashMap initialization with Map.of to set a cleaner template for the 12 downstream IT migrations. Drops unused HashMap import. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Replaces in-method startDaprApp + run.checkRunState polling with a per-class DaprContainer in @BeforeAll and a dapr.isRunning() poll to verify shutdown. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Boots Dapr via DaprContainer with the redisConfigStore component, seeds the shared SharedTestInfra Redis via Jedis (replacing the previous docker-exec redis-cli shell-out which targeted the dapr_redis container). Adds jedis 5.1.0 as a sdk-tests test dependency. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
AbstractStateClientIT now extends BaseContainerIT instead of BaseIT. GRPCStateClientIT uses DaprContainer + redisStateStore (actor store enabled) per-class via @BeforeAll. The single MongoDB-dependent test (saveAndQueryAndDeleteState) is @disabled — out of scope for the Testcontainers migration per spec D9 / Non-Goals. QUERY_STATE_STORE constant is moved from the inherited BaseIT into AbstractStateClientIT locally since the @disabled test still references it (kept compilable for the eventual MongoDB-on-Testcontainers follow-up). Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Lazy-init openzipkin/zipkin on the shared Network with alias 'zipkin'. Used by TracingIT migrations in Phase 6 of the Testcontainers migration. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Uses startAppAndAttach to spawn MyActorService in a subprocess and wire the DaprContainer's appPort/appChannelAddress to host.testcontainers.internal. Adds a newActorClient(dapr, metadata) overload to BaseContainerIT for the second test which overrides Content-Length via actor metadata. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Lifecycle shifts from in-method startDaprApp to per-class @BeforeAll using startAppAndAttach with DemoActorService. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Per-class @BeforeAll using startAppAndAttach with MyActorService. buildManagedChannel reads gRPC port from dapr.getGrpcPort() (the DaprContainer's mapped port) instead of the global Properties.GRPC_PORT which would default to 50001 and miss the container's ephemeral port. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Per-class @BeforeAll using startAppAndAttach with MyActorService. Both proxy builders share the per-class actorClient. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
@beforeeach -> @BeforeAll per spec D9. The two mutating @test methods target different endpoints (/messages vs /persons) so per-class lifecycle is safe. Other three tests are stateless. App name is now the literal "methodinvoke-http-it" (kebab-case, replacing the prior "MethodInvokeIThttp" auto-generated from class name). Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
@beforeeach -> @BeforeAll per spec D9. DaprContainer told to speak gRPC to the app via .withAppProtocol(DaprProtocol.GRPC). createGrpcStub is now private static using APP_NAME literal. Only one test (testInvoke) mutates the message store; the two sleep tests are stateless. Per-class lifecycle is safe. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Wires Zipkin tracing via Configuration + ZipkinTracingConfigurationSettings so Dapr pushes spans to the shared Zipkin container (alias zipkin:9411). The test JVM's OpenTelemetry SDK and the Validation REST query both use the host-mapped Zipkin port. Adds zipkin-URL-aware overloads to OpenTelemetry.createOpenTelemetry and Validation.validate so the migrated IT can pass the testcontainerized host:port. The legacy single-Zipkin-URL overloads remain unchanged for back-compat. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Same pattern as the http variant in T15: per-class @BeforeAll, Zipkin wired via Configuration + ZipkinTracingConfigurationSettings, gRPC app protocol set on the DaprContainer. Validation now uses the host-mapped Zipkin URL (the test-side OpenTelemetry exporter and the trace REST query both reach it on localhost:<mappedPort>); Dapr's daprd pushes spans to the container-network alias zipkin:9411. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
The only Mongo consumer (AbstractStateClientIT#saveAndQueryAndDeleteState) is now @disabled as part of the Testcontainers migration. 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>
- DAPR_IMAGE: use the testcontainers-dapr library default (DaprContainerConstants.DAPR_RUNTIME_IMAGE_TAG = 1.18.0-rc.3) instead of the hardcoded 1.15.6. The library's DaprContainer constructor rejects images that don't match its default unless they're declared asCompatibleSubstituteFor. - DaprPorts.build(true, false, false) NPEs because the DaprPorts constructor calls .toString() on the Integer http/grpc ports unconditionally. Pass true for all three; the http/grpc ports are unused at runtime since AppRun's 6-arg ctor uses the started DaprContainer's mapped ports as overrides. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
The SUCCESS_MESSAGE constants on the test service classes contain
strings that daprd emits to its own stdout (e.g. 'dapr initialized.
Status: Running', 'application discovered on port'). Under the legacy
'dapr run' harness, the dapr CLI merged daprd's stdout into the app
subprocess's stdout, so AppRun.start()'s success-message scan caught
those strings and proceeded.
In the containerized world, daprd lives in a separate Docker container
and its logs go to Docker, never to the mvn exec:java subprocess. The
scan never matched, every actor/method-invoke/tracing IT timed out
after 5 minutes with 'Could not find success criteria for command'.
Pass an empty success-message ('') to AppRun's 6-arg ctor so
Command.run() returns on Maven's first stdout banner line. AppRun.start()
then waits for the app to actually bind its port via assertListeningOnPort,
which is the real readiness signal in the containerized world.
Drops the now-unused getServiceSuccessMessage reflection helper.
Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Three failure clusters fixed: 1. SecretsClientIT — Component metadata was missing nestedSeparator=: and multiValued=true (the legacy YAML in sdk-tests/components has both). Without them, daprd's local-file secret store loaded the JSON as flat-key-only and getSecret(uuidKey) failed with 'secret not found'. 2. Actor ITs (4) — added waitForActorsReady(dapr) helper that delegates to DaprWait.forActors().waitUntilReady(dapr). Tests were running before placement registered the app's actor types, surfacing as FAILED_PRECONDITION 'did not find address for actor MyActorTest/1'. Matches the pattern in spring-boot-4-sdk-tests' DaprActorsIT. 3. startAppAndAttach now does a client.waitForSidecar(30s) round-trip on a fresh DaprClient before returning. DaprContainer's HTTP healthz/outbound wait strategy returns 2xx slightly before daprd's gRPC server is fully accepting, causing 'UNAVAILABLE: error reading server preface: EOF' on the first gRPC call from method-invoke and tracing ITs. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Add .withLogConsumer to surface daprd's stdout in CI logs, and bump log level to DEBUG. Currently the container's output is consumed by Testcontainers and we have no insight into why daprd isn't discovering the app's actors (or any other component-init failures). Diagnostic-only commit; revert to INFO + drop log consumer once root causes are identified. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
spring-boot-4-sdk-tests' DaprActorsIT does Testcontainers.exposeHostPorts in @beforeeach (after the container is started). Empirically, exposing before container start leaves daprd unable to reach back to host.testcontainers.internal:<appPort> for app discovery, causing 'did not find address for actor' errors. Move the call to immediately after dapr.start() so the SSH bridge is established while daprd is alive. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Captures: branch state, what landed, current CI failures, fixes tried, fixes left to try, local Docker access constraint, and instructions for resuming the work in a fresh session. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
When daprd starts before the AppRun subprocess, daprd's app-channel probe reports success against the Testcontainers SSH bridge before the JVM has bound the host port. Daprd then fetches /dapr/config, gets nothing, reports actor types [] to placement, and never re-queries — so the 4 actor ITs hang at waitForActorsReady. Start the AppRun subprocess first (its assertListeningOnPort blocks until the JVM binds appPort), then start daprd. The DAPR_HTTP_PORT/DAPR_GRPC_PORT env vars are passed as 0 to AppRun because every IT using this helper builds its DaprClients via newDaprClient(dapr) which reads daprd's mapped ports directly — the test app processes themselves don't read DAPR_*_PORT. Verified locally: ActorExceptionIT, ActivationDeactivationIT, ActorMethodNameIT, MethodInvokeIT (http+grpc), and ActorTurnBasedConcurrencyIT (4/5 methods) all pass after the change. Tracing ITs and the 5th ActorTurnBasedConcurrencyIT method have unrelated pre-existing issues. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Two fixes for the actor/tracing CI failures:
1. Pin daprd's HTTP/gRPC host ports to the pre-allocated DaprPorts values.
The previous fix passed DAPR_HTTP_PORT/DAPR_GRPC_PORT=0 to the AppRun env,
assuming the test apps never read them. ActorTurnBasedConcurrencyIT proved
that wrong: registerActorTimer dials the sidecar from the actor side using
that env var, so it failed with "UNAVAILABLE: io exception" and the timer
never fired. The fix has BaseContainerIT take an UNSTARTED DaprContainer
from the factory, applies setPortBindings("<httpHost>:3500", "<grpcHost>:50001")
from the same DaprPorts the AppRun was given, and starts the container —
so the env vars and the actual sidecar match.
2. Drop the bogus "-service" suffix from the tracing IT span-name assertions.
Daprd's CallLocal span (lowercased by Zipkin) is named
"calllocal/<APP_NAME>/<method>" — the tests were querying
"calllocal/<APP_NAME>-service/<method>" which never existed.
Verified locally: 14/14 tests pass across ActorExceptionIT, ActivationDeactivationIT,
ActorMethodNameIT, ActorTurnBasedConcurrencyIT, MethodInvokeIT (http+grpc),
and TracingIT (grpc). TracingIT (http) wasn't runnable locally (Service hardcodes
localhost:9411 for OTel exporter) but should pass in CI's dapr-init env.
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>
…ration.md Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
…ration-design.md Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
bd0e469 to
236d2a1
Compare
The migration originally @disabled AbstractStateClientIT.saveAndQueryAndDeleteState because the legacy harness relied on a Mongo container managed by docker compose, which we dropped. Restore the test by adding a shared Mongo Testcontainer to SharedTestInfra, a mongoStateStore() helper on BaseContainerIT, and registering the mongo-statestore component on GRPCStateClientIT's DaprContainer. Verified locally: GRPCStateClientIT now runs 18/18 tests including the re-enabled query test. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Two fixes to the streaming-subscription reconnect loop introduced earlier: - Cap the bit-shift, not just the result. (1L << reconnectAttempts) overflows Long once reconnectAttempts grows large, producing a negative backoffMs that Math.min preserves; Thread.sleep then throws IllegalArgumentException and kills the receiver. Capping shift at 5 yields 1000 << 5 == 32000 ms, which is already past the 30s ceiling — no useful range is lost and overflow is impossible for any reconnectAttempts value. - Interrupt the receiver thread in close(). Previously close() only interrupted the acker, so a receiver currently in its backoff sleep would block shutdown for up to 30s. Both threads' sleep paths already handle InterruptedException by setting running=false and re-interrupting, so this is safe. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Replace the cap-the-shift trick with a plain `long backoffMs` initialized to 1s and doubled (capped at 30s) on each reconnect. Same backoff schedule, no overflow path, easier to read. Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1754 +/- ##
============================================
+ Coverage 76.87% 76.97% +0.10%
- Complexity 2292 2294 +2
============================================
Files 243 243
Lines 7117 7127 +10
Branches 745 747 +2
============================================
+ Hits 5471 5486 +15
+ Misses 1280 1276 -4
+ Partials 366 365 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR reduces flakiness in the Java SDK integration test suite by migrating several legacy dapr run-based tests to Testcontainers, introducing shared containerized infra (Redis/Zipkin/Mongo) for faster and more reliable runs, and tightening up a few timing/race-related behaviors. It also updates the SDK’s deprecated streaming Subscription to reconnect with exponential backoff and to shut down more promptly.
Changes:
- Introduce
BaseContainerIT+SharedTestInfrato standardize Testcontainers-based Dapr/app bootstrapping and shared backing services. - Migrate/adjust multiple ITs (actors, method-invoke, tracing, configuration, jobs, pubsub streaming) to reduce race conditions and CI intermittency.
- Improve resiliency/retry behaviors in tests and in
Subscription(backoff + faster shutdown).
Reviewed changes
Copilot reviewed 44 out of 44 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| spring-boot-4-sdk-tests/src/test/java/io/dapr/it/springboot4/testcontainers/jobs/DaprJobsIT.java | Stabilize jobs tests with unique names + Awaitility polling. |
| sdk/src/main/java/io/dapr/client/Subscription.java | Add reconnect backoff and ensure receiver unblocks on error; interrupt receiver on close. |
| sdk-tests/src/test/java/io/dapr/it/tracing/Validation.java | Add overload to validate traces against an explicit Zipkin URL. |
| sdk-tests/src/test/java/io/dapr/it/tracing/OpenTelemetry.java | Add OpenTelemetry factory accepting an explicit Zipkin endpoint URL. |
| sdk-tests/src/test/java/io/dapr/it/tracing/http/TracingIT.java | Migrate HTTP tracing IT to Testcontainers + shared Zipkin. |
| sdk-tests/src/test/java/io/dapr/it/tracing/grpc/TracingIT.java | Migrate gRPC tracing IT to Testcontainers + shared Zipkin. |
| sdk-tests/src/test/java/io/dapr/it/testcontainers/secrets/DaprSecretsIT.java | Add (currently disabled) secrets IT using DaprContainer. |
| sdk-tests/src/test/java/io/dapr/it/testcontainers/pubsub/stream/DaprPubSubStreamIT.java | Add Testcontainers-based streaming pubsub ITs. |
| sdk-tests/src/test/java/io/dapr/it/testcontainers/pubsub/outbox/DaprPubSubOutboxIT.java | Adjust outbox IT container lifecycle + longer Awaitility window; clarify disable reason. |
| sdk-tests/src/test/java/io/dapr/it/testcontainers/pubsub/http/SubscriberController.java | Decouple testcontainers subscriber types from removed legacy PubSubIT inner classes. |
| sdk-tests/src/test/java/io/dapr/it/testcontainers/pubsub/http/MyObject.java | New typed payload model for pubsub HTTP ITs. |
| sdk-tests/src/test/java/io/dapr/it/testcontainers/pubsub/http/DaprPubSubIT.java | Update pubsub HTTP IT to use new typed models. |
| sdk-tests/src/test/java/io/dapr/it/testcontainers/pubsub/http/ConvertToLong.java | New value wrapper model for long-value pubsub tests. |
| sdk-tests/src/test/java/io/dapr/it/testcontainers/jobs/DaprJobsIT.java | Stabilize jobs tests with unique names + Awaitility polling. |
| sdk-tests/src/test/java/io/dapr/it/state/HelloWorldGrpcStateService.java | Remove legacy example app used by old state IT. |
| sdk-tests/src/test/java/io/dapr/it/state/HelloWorldClientIT.java | Remove legacy state IT. |
| sdk-tests/src/test/java/io/dapr/it/state/GRPCStateClientIT.java | Migrate gRPC state IT to Testcontainers-based Dapr. |
| sdk-tests/src/test/java/io/dapr/it/state/AbstractStateClientIT.java | Base for state ITs now extends container-based test base. |
| sdk-tests/src/test/java/io/dapr/it/secrets/SecretsClientIT.java | Migrate secrets IT to Testcontainers; avoid mutating local repo files. |
| sdk-tests/src/test/java/io/dapr/it/resiliency/SdkResiliencyIT.java | Use WireMockExtension dynamic port + explicit DaprContainer start/stop. |
| sdk-tests/src/test/java/io/dapr/it/pubsub/stream/PubSubStreamIT.java | Remove legacy streaming pubsub IT. |
| sdk-tests/src/test/java/io/dapr/it/pubsub/http/SubscriberService.java | Remove legacy subscriber Spring app used by old pubsub IT. |
| sdk-tests/src/test/java/io/dapr/it/pubsub/http/SubscriberController.java | Remove legacy subscriber controller used by old pubsub IT. |
| sdk-tests/src/test/java/io/dapr/it/pubsub/http/PubSubIT.java | Remove legacy pubsub IT (replaced by Testcontainers equivalents). |
| sdk-tests/src/test/java/io/dapr/it/methodinvoke/http/MethodInvokeIT.java | Migrate HTTP method-invoke IT to Testcontainers base. |
| sdk-tests/src/test/java/io/dapr/it/methodinvoke/grpc/MethodInvokeIT.java | Migrate gRPC method-invoke IT to Testcontainers base. |
| sdk-tests/src/test/java/io/dapr/it/DaprRun.java | Make legacy stop behavior less noisy; adjust health wait logic. |
| sdk-tests/src/test/java/io/dapr/it/containers/SharedTestInfraTest.java | Add tests for shared infra singleton behavior and endpoints. |
| sdk-tests/src/test/java/io/dapr/it/containers/SharedTestInfra.java | Add shared Redis/Zipkin/Mongo containers (lazy singleton). |
| sdk-tests/src/test/java/io/dapr/it/containers/BaseContainerITSmokeTest.java | Add smoke test validating BaseContainerIT wiring. |
| sdk-tests/src/test/java/io/dapr/it/containers/BaseContainerIT.java | New Testcontainers-based test base with helpers for Dapr/app lifecycle and components. |
| sdk-tests/src/test/java/io/dapr/it/configuration/ConfigurationClientIT.java | Migrate config IT to Testcontainers and seed Redis via Jedis (no docker exec). |
| sdk-tests/src/test/java/io/dapr/it/AppRunOverrideTest.java | Add test for AppRun Dapr port override env propagation. |
| sdk-tests/src/test/java/io/dapr/it/AppRun.java | Add constructor overload to support explicit Dapr port overrides. |
| sdk-tests/src/test/java/io/dapr/it/api/ApiIT.java | Migrate shutdown API IT to Testcontainers. |
| sdk-tests/src/test/java/io/dapr/it/actors/ActorTurnBasedConcurrencyIT.java | Migrate actor concurrency IT to Testcontainers base and shared clients. |
| sdk-tests/src/test/java/io/dapr/it/actors/ActorTimerRecoveryIT.java | Reduce fixed sleeps; rely more on retry polling with longer windows. |
| sdk-tests/src/test/java/io/dapr/it/actors/ActorReminderRecoveryIT.java | Reduce fixed sleeps; rely more on retry polling with longer windows. |
| sdk-tests/src/test/java/io/dapr/it/actors/ActorMethodNameIT.java | Migrate actor method name IT to Testcontainers base. |
| sdk-tests/src/test/java/io/dapr/it/actors/ActorExceptionIT.java | Migrate actor exception IT to Testcontainers base; add metadata client path. |
| sdk-tests/src/test/java/io/dapr/it/actors/ActivationDeactivationIT.java | Migrate activation/deactivation IT to Testcontainers base. |
| sdk-tests/pom.xml | Add Jedis test dependency for Redis seeding in containerized tests. |
| sdk-tests/deploy/local-test.yml | Stop spinning up mongo via compose (now handled via Testcontainers). |
| .github/workflows/build.yml | Stop starting mongo in CI compose step (Kafka only). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public static synchronized GenericContainer<?> zipkin() { | ||
| if (zipkin == null) { | ||
| zipkin = new GenericContainer<>(DockerImageName.parse("openzipkin/zipkin:latest")) | ||
| .withNetwork(network()) | ||
| .withNetworkAliases(ZIPKIN_NETWORK_ALIAS) | ||
| .withExposedPorts(9411) | ||
| .withReuse(true); | ||
| zipkin.start(); |
| HttpResponse<String> response = HTTP_CLIENT.send(request, HttpResponse.BodyHandlers.ofString()); | ||
| DocumentContext documentContext = JsonPath.parse(response.body()); | ||
| String mainSpanId = readOne(documentContext, String.format(JSONPATH_MAIN_SPAN_ID, spanName)).toString(); | ||
|
|
||
| assertNotNull(mainSpanId); | ||
|
|
||
| String sleepSpanId = readOne(documentContext, String.format(JSONPATH_SLEEP_SPAN_ID, mainSpanId, sleepSpanName)) | ||
| .toString(); | ||
|
|
||
| assertNotNull(sleepSpanId); |
| if (e.getMessage() != null && e.getMessage().contains("Could not find success criteria")) { | ||
| System.out.println("App " + this.appName + " already stopped or not found (ignored)."); | ||
| } else { | ||
| System.out.println("Could not stop app " + this.appName + ": " + e.getMessage()); |
Description
Please explain the changes you've made
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #[issue number]
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: