File tree Expand file tree Collapse file tree
src/main/kotlin/org/dexpace/sdk/example Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,9 +29,10 @@ modules) to skip it. See that module's `build.gradle.kts` for the pipeline.
2929
3030## Repository Layout
3131
32- Ten Gradle modules (see ` settings.gradle.kts ` ). ` gradle/libs.versions.toml ` is the single source of truth
33- for dependency and plugin versions. Group ` org.dexpace ` , version ` 0.0.1-alpha.1 ` . (The tenth,
34- ` sdk-shrink-test ` , is a test-only, unpublished R8 shrink-survival guard — not listed below.)
32+ Eleven Gradle modules (see ` settings.gradle.kts ` ). ` gradle/libs.versions.toml ` is the single source of
33+ truth for dependency and plugin versions. Group ` org.dexpace ` , version ` 0.0.1-alpha.1 ` . (Two are
34+ unpublished and not listed below: ` sdk-shrink-test ` , a test-only R8 shrink-survival guard, and
35+ ` sdk-example ` , a runnable end-to-end usage sample.)
3536
3637| Module | Purpose | JVM target |
3738| ---| ---| ---|
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-t
2828okio = { module = " com.squareup.okio:okio" , version.ref = " okio" }
2929okhttp = { module = " com.squareup.okhttp3:okhttp" , version.ref = " okhttp" }
3030okhttp-tls = { module = " com.squareup.okhttp3:okhttp-tls" , version.ref = " okhttp" }
31+ okhttp-mockwebserver = { module = " com.squareup.okhttp3:mockwebserver3" , version.ref = " mockwebserver" }
3132okhttp-mockwebserver-junit5 = { module = " com.squareup.okhttp3:mockwebserver3-junit5" , version.ref = " mockwebserver" }
3233reactor-core = { module = " io.projectreactor:reactor-core" , version.ref = " reactor" }
3334reactor-test = { module = " io.projectreactor:reactor-test" , version.ref = " reactor" }
Original file line number Diff line number Diff line change @@ -38,7 +38,10 @@ dependencies {
3838
3939 // MockWebServer ships in the OkHttp project as a generic embedded HTTP server. The sample
4040 // drives it from `main()` so the end-to-end exchange runs deterministically with no network.
41- implementation(libs.okhttp.mockwebserver.junit5)
41+ // The plain `mockwebserver3` artifact is used (not the `-junit5` variant): the sample manages
42+ // the server lifecycle by hand from `main()` and the smoke test, so no JUnit 5 extension — and
43+ // none of the JUnit it would drag onto the runtime classpath — is needed here.
44+ implementation(libs.okhttp.mockwebserver)
4245 // okhttp-tls mints a self-signed certificate so the embedded server can speak HTTPS — the
4346 // AUTH pillar step refuses to stamp credentials over plaintext, so the sample uses TLS exactly
4447 // as a production caller would. `OkHttpClient` is configured directly here, hence the explicit
Original file line number Diff line number Diff line change @@ -139,7 +139,11 @@ public fun buildPipeline(transport: HttpClient): HttpPipeline =
139139 HttpPipelineBuilder (transport)
140140 // REDIRECT pillar — follow 3xx responses within a hop budget.
141141 .append(DefaultRedirectStep ())
142- // RETRY pillar — exponential backoff that honours `Retry-After`.
142+ // RETRY pillar — exponential backoff that honours `Retry-After`. This re-sends a request
143+ // when its method is idempotent or its body is replayable; the sample's POST carries a
144+ // replayable (in-memory) body, so it qualifies. A real caller retrying a non-idempotent
145+ // write should pair this with an idempotency key (see `IdempotencyKeyStep`) so a retried
146+ // POST cannot create a duplicate server-side.
143147 .append(DefaultRetryStep ())
144148 // AUTH pillar — stamp a static API key into the `Authorization` header.
145149 .append(
You can’t perform that action at this time.
0 commit comments