You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Give examples/spring-kotlin a docker-backed integration test that proves the Spring starter serves
data end-to-end through a live Liberator, modelled on the shape of application-apis' CalendarAdapterIntegrationTest (Liberator Testcontainer → real adapter against the mapped DataSource
port → StreamLink client assertions via Turbine).
Add an integrationTestJvmTestSuite depending on datasourcex-kotest, the Kotest runner, and
Turbine. It is not wired into check, and Kover instrumentation is disabled for it — so CI
(no Docker registry) never runs it; developers run :spring-kotlin:integrationTest on demand.
No production change to the example. The adapter is pointed at the container's mapped DataSource
port purely by overriding a startup property. The following shape came from the prototype in spring-kotlin docker-backed integrationTest design #64
and encodes the key decision (start-the-real-adapter-via-config, then assert through a StreamLink
client):
val liberator = install(LiberatorContainerExtension())
val ctx =SpringApplicationBuilder(SpringKotlinApplication::class.java)
.properties("caplin.datasource.managed.peer.outgoing="+"ws://${liberator.containerState.host}:${liberator.dataSourcePort}")
.run()
// liberator.connect("alice").getSubject<Payload>(Subject("public","stream","foo","42"))…
Assert: the public Payload stream (first item version 0, parameter1="foo", parameter2=42,
non-null uuid; next item version 1); the public container's initial Bulk of 10 rows; and the
USER_ID / persistent-session token injection reaching the payload. Proving USER_ID overrides the
path requires a Liberator object-map (%u) override supplied via DefaultContainerConfig(adapterConfig = …),
and the session assertion requires establishing a persistent session — validate these while building.
Acceptance criteria
examples/spring-kotlin has an integrationTest source set depending on datasourcex-kotest.
The suite is excluded from check and from Kover; ./gradlew check does not start a container.
The test starts the real spring-kotlin adapter against the container's mapped port via configuration only (no production-code change).
It asserts the public Payload stream and the container's 10-row bulk end-to-end.
It asserts the injected USER_ID and persistent-session id thread into the payload.
:spring-kotlin:integrationTest passes locally against a real Liberator.
Parent
#65
What to build
Give
examples/spring-kotlina docker-backed integration test that proves the Spring starter servesdata end-to-end through a live Liberator, modelled on the shape of
application-apis'CalendarAdapterIntegrationTest(Liberator Testcontainer → real adapter against the mapped DataSourceport → StreamLink client assertions via Turbine).
Add an
integrationTestJvmTestSuitedepending ondatasourcex-kotest, the Kotest runner, andTurbine. It is not wired into
check, and Kover instrumentation is disabled for it — so CI(no Docker registry) never runs it; developers run
:spring-kotlin:integrationTeston demand.No production change to the example. The adapter is pointed at the container's mapped DataSource
port purely by overriding a startup property. The following shape came from the prototype in spring-kotlin docker-backed integrationTest design #64
and encodes the key decision (start-the-real-adapter-via-config, then assert through a StreamLink
client):
Assert: the public Payload stream (first item version 0,
parameter1="foo",parameter2=42,non-null uuid; next item version 1); the public container's initial
Bulkof 10 rows; and theUSER_ID / persistent-session token injection reaching the payload. Proving USER_ID overrides the
path requires a Liberator object-map (
%u) override supplied viaDefaultContainerConfig(adapterConfig = …),and the session assertion requires establishing a persistent session — validate these while building.
Acceptance criteria
examples/spring-kotlinhas anintegrationTestsource set depending ondatasourcex-kotest.checkand from Kover;./gradlew checkdoes not start a container.:spring-kotlin:integrationTestpasses locally against a real Liberator.Blocked by