From 93e5e6050649afe2b035ec98fb68b5636a421574 Mon Sep 17 00:00:00 2001 From: Richard Summerhayes Date: Mon, 25 Nov 2024 15:24:48 -0800 Subject: [PATCH 1/6] Add pendo back to the docs site --- .../js/vendor/js.cookie.min.js | 2 + .../partials/footer-scripts-supplemental.hbs | 86 ++++++++++++++++++- 2 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 docs/supplemental_ui/js/vendor/js.cookie.min.js diff --git a/docs/supplemental_ui/js/vendor/js.cookie.min.js b/docs/supplemental_ui/js/vendor/js.cookie.min.js new file mode 100644 index 000000000..90a767223 --- /dev/null +++ b/docs/supplemental_ui/js/vendor/js.cookie.min.js @@ -0,0 +1,2 @@ +/*! js-cookie v3.0.1 | MIT */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,(function(){"use strict";function e(e){for(var t=1;t + \ No newline at end of file From 78cddd253282a5b1a10a64652dc133ac836bc951 Mon Sep 17 00:00:00 2001 From: Richard Summerhayes Date: Mon, 25 Nov 2024 15:27:06 -0800 Subject: [PATCH 2/6] doc.akka not docs.akka --- .../partials/footer-scripts-supplemental.hbs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/supplemental_ui/partials/footer-scripts-supplemental.hbs b/docs/supplemental_ui/partials/footer-scripts-supplemental.hbs index dd1341635..3487aabc1 100644 --- a/docs/supplemental_ui/partials/footer-scripts-supplemental.hbs +++ b/docs/supplemental_ui/partials/footer-scripts-supplemental.hbs @@ -12,11 +12,11 @@ switch (hostname) { case "localhost": return "localhost"; - case "docs.akka.dev": + case "doc.akka.dev": return "dev"; - case "docs.akka.st": + case "doc.akka.st": return "staging"; - case "docs.akka.io": + case "doc.akka.io": return "prod"; default: if (hostname.includes("akka.work")) { @@ -32,11 +32,11 @@ switch (hostname) { case "localhost": return "localhost"; - case "docs.akka.dev": + case "doc.akka.dev": return ".akka.dev"; - case "docs.akka.st": + case "doc.akka.st": return ".akka.st"; - case "docs.akka.io": + case "doc.akka.io": return ".akka.io"; default: if (hostname.includes("akka.work")) { From dc8956c735188942638f70515933568710a7fe62 Mon Sep 17 00:00:00 2001 From: Richard Summerhayes Date: Tue, 10 Dec 2024 10:57:58 -0800 Subject: [PATCH 3/6] remove un-needed environments --- .../partials/footer-scripts-supplemental.hbs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docs/supplemental_ui/partials/footer-scripts-supplemental.hbs b/docs/supplemental_ui/partials/footer-scripts-supplemental.hbs index 3487aabc1..47ea07cd6 100644 --- a/docs/supplemental_ui/partials/footer-scripts-supplemental.hbs +++ b/docs/supplemental_ui/partials/footer-scripts-supplemental.hbs @@ -12,10 +12,6 @@ switch (hostname) { case "localhost": return "localhost"; - case "doc.akka.dev": - return "dev"; - case "doc.akka.st": - return "staging"; case "doc.akka.io": return "prod"; default: @@ -32,10 +28,6 @@ switch (hostname) { case "localhost": return "localhost"; - case "doc.akka.dev": - return ".akka.dev"; - case "doc.akka.st": - return ".akka.st"; case "doc.akka.io": return ".akka.io"; default: From ed4bded14ed0aa4eb4b253951d0739cfdcacc61d Mon Sep 17 00:00:00 2001 From: Francisco Lopez-Sancho Date: Wed, 11 Dec 2024 20:23:04 +0800 Subject: [PATCH 4/6] chore: removing it profile (#63) * chore: removing 'it' profile ci, parent pom and moving samples 'it' to 'test' * renaming '*IntegrationTest' to * updating docs and updating class names (updating file names wan't enough) * adding missing failsafe plugin * Update akka-javasdk-maven/akka-javasdk-parent/pom.xml Co-authored-by: Renato Cavalcanti * Update akka-javasdk-maven/akka-javasdk-parent/pom.xml Co-authored-by: Renato Cavalcanti * Update docs/src/modules/java/pages/event-sourced-entities.adoc Co-authored-by: Renato Cavalcanti * Update docs/src/modules/java/pages/key-value-entities.adoc Co-authored-by: Renato Cavalcanti * Update .github/workflows/ci.yml Co-authored-by: Renato Cavalcanti * docs: add local console to getting started guide (#58) * docs: review support pages (#64) * addressing comments .+ back to IntegrationTest suffix * Revert "docs: review support pages (#64)" This reverts commit 493648d97920299d78957c95539d39650a6b2fdf. * Revert "docs: add local console to getting started guide (#58)" This reverts commit 29311bf2064ee9a18198d0f498f93634b50e713a. * fixing import * removing snapshot version used when testing * renaming class --------- Co-authored-by: Renato Cavalcanti Co-authored-by: Brent Eritou Co-authored-by: Enno Runne <458526+ennru@users.noreply.github.com> --- .github/workflows/ci.yml | 4 +- .../META-INF/maven/archetype-metadata.xml | 2 +- .../IntegrationTest.java | 0 .../akka-javasdk-parent/pom.xml | 57 ++++++++++++------- .../modules/java/pages/access-control.adoc | 4 +- .../modules/java/pages/auth-with-jwts.adoc | 4 +- .../java/pages/consuming-producing.adoc | 20 +++---- .../java/pages/event-sourced-entities.adoc | 7 +-- .../java/pages/key-value-entities.adoc | 6 +- .../pages/setup-and-dependency-injection.adoc | 4 +- docs/src/modules/java/pages/views.adoc | 4 +- .../registry/UserCreationIntegrationTest.java | 0 .../{it => test}/resources/application.conf | 0 .../java/com/example/MyIntegrationTest.java | 0 .../acl/UserEndpointIntegrationTest.java | 0 .../com/example/jwt/JwtIntegrationTest.java | 0 .../hellojwt/api/HelloJwtIntegrationTest.java | 0 .../event-sourced-counter-brokers/README.md | 2 +- .../application/CounterIntegrationTest.java | 0 .../CounterWithRealKafkaIntegrationTest.java | 1 - .../CounterWithRealPubSubIntegrationTest.java | 1 - .../customer/api/CustomerIntegrationTest.java | 0 .../api/CustomerRegistryIntegrationTest.java | 0 .../CustomersByNameViewIntegrationTest.java | 0 .../customer/api/CustomerIntegrationTest.java | 0 .../com/example/CounterIntegrationTest.java | 0 .../customer/CustomerIntegrationTest.java | 0 .../CustomersByCityIntegrationTest.java | 0 .../example/ShoppingCartIntegrationTest.java} | 2 +- .../example/OrderEndpointIntegrationTest.java | 0 .../ShoppingCartIntegrationTest.java} | 2 +- .../com/example/CounterIntegrationTest.java | 0 .../java/com/example/FixedClock.java | 0 .../java/com/example/TestEmailSender.java | 0 .../resources/application.properties | 0 .../com/example/TracingIntegrationTest.java} | 2 +- .../transfer-workflow-compensation/README.md | 4 +- .../TransferWorkflowIntegrationTest.java | 0 .../WalletEntityIntegrationTest.java | 0 .../com/example/wallet/domain/WalletTest.java | 0 samples/transfer-workflow/README.md | 4 +- .../TransferWorkflowIntegrationTest.java | 0 .../store/view/StoreViewIntegrationTest.java | 0 ...inedCustomerOrdersViewIntegrationTest.java | 0 ...stedCustomerOrdersViewIntegrationTest.java | 0 ...uredCustomerOrdersViewIntegrationTest.java | 0 46 files changed, 70 insertions(+), 60 deletions(-) rename akka-javasdk-maven/akka-javasdk-archetype/src/main/resources/archetype-resources/src/{it => test}/java/__packageInPathFormat__/IntegrationTest.java (100%) rename samples/choreography-saga-quickstart/src/{it => test}/java/user/registry/UserCreationIntegrationTest.java (100%) rename samples/choreography-saga-quickstart/src/{it => test}/resources/application.conf (100%) rename samples/doc-snippets/src/{it => test}/java/com/example/MyIntegrationTest.java (100%) rename samples/doc-snippets/src/{it => test}/java/com/example/acl/UserEndpointIntegrationTest.java (100%) rename samples/doc-snippets/src/{it => test}/java/com/example/jwt/JwtIntegrationTest.java (100%) rename samples/endpoint-jwt/src/{it => test}/java/hellojwt/api/HelloJwtIntegrationTest.java (100%) rename samples/event-sourced-counter-brokers/src/{it => test}/java/counter/application/CounterIntegrationTest.java (100%) rename samples/event-sourced-counter-brokers/src/{it => test}/java/counter/application/CounterWithRealKafkaIntegrationTest.java (98%) rename samples/event-sourced-counter-brokers/src/{it => test}/java/counter/application/CounterWithRealPubSubIntegrationTest.java (98%) rename samples/event-sourced-customer-registry-subscriber/src/{it => test}/java/customer/api/CustomerIntegrationTest.java (100%) rename samples/event-sourced-customer-registry-subscriber/src/{it => test}/java/customer/api/CustomerRegistryIntegrationTest.java (100%) rename samples/event-sourced-customer-registry-subscriber/src/{it => test}/java/customer/api/CustomersByNameViewIntegrationTest.java (100%) rename samples/event-sourced-customer-registry/src/{it => test}/java/customer/api/CustomerIntegrationTest.java (100%) rename samples/key-value-counter/src/{it => test}/java/com/example/CounterIntegrationTest.java (100%) rename samples/key-value-customer-registry/src/{it => test}/java/customer/CustomerIntegrationTest.java (100%) rename samples/key-value-customer-registry/src/{it => test}/java/customer/application/CustomersByCityIntegrationTest.java (100%) rename samples/key-value-shopping-cart/src/{it/java/com/example/IntegrationTest.java => test/java/com/example/ShoppingCartIntegrationTest.java} (98%) rename samples/reliable-timers/src/{it => test}/java/com/example/OrderEndpointIntegrationTest.java (100%) rename samples/shopping-cart-quickstart/src/{it/java/shoppingcart/IntegrationTest.java => test/java/shoppingcart/ShoppingCartIntegrationTest.java} (96%) rename samples/spring-dependency-injection/src/{it => test}/java/com/example/CounterIntegrationTest.java (100%) rename samples/spring-dependency-injection/src/{it => test}/java/com/example/FixedClock.java (100%) rename samples/spring-dependency-injection/src/{it => test}/java/com/example/TestEmailSender.java (100%) rename samples/spring-dependency-injection/src/{it => test}/resources/application.properties (100%) rename samples/tracing/src/{it/java/com/example/IntegrationTest.java => test/java/com/example/TracingIntegrationTest.java} (86%) rename samples/transfer-workflow-compensation/src/{it => test}/java/com/example/transfer/TransferWorkflowIntegrationTest.java (100%) rename samples/transfer-workflow-compensation/src/{it => test}/java/com/example/wallet/application/WalletEntityIntegrationTest.java (100%) rename samples/transfer-workflow-compensation/src/{it => test}/java/com/example/wallet/domain/WalletTest.java (100%) rename samples/transfer-workflow/src/{it => test}/java/com/example/transfer/TransferWorkflowIntegrationTest.java (100%) rename samples/view-store/src/{it => test}/java/store/view/StoreViewIntegrationTest.java (100%) rename samples/view-store/src/{it => test}/java/store/view/joined/JoinedCustomerOrdersViewIntegrationTest.java (100%) rename samples/view-store/src/{it => test}/java/store/view/nested/NestedCustomerOrdersViewIntegrationTest.java (100%) rename samples/view-store/src/{it => test}/java/store/view/structured/StructuredCustomerOrdersViewIntegrationTest.java (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5081ee4b..a5c074b68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -440,7 +440,7 @@ jobs: fi if [ true == '${{matrix.it}}' ]; then ${PRE_CMD} - KALIX_TESTKIT_DEBUG=true mvn verify -Pit --no-transfer-progress + KALIX_TESTKIT_DEBUG=true mvn integration-test --no-transfer-progress fi - name: ${{ matrix.sample }} rm & test-compile @@ -450,5 +450,5 @@ jobs: export SDK_VERSION=$(cat ~/akka-javasdk-version.txt) cd samples/${DIR} echo "==== Verifying that generated unmanaged sources compile ====" - rm -rf src/main/java src/test/java src/it/java + rm -rf src/main/java src/test/java mvn test-compile --no-transfer-progress diff --git a/akka-javasdk-maven/akka-javasdk-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/akka-javasdk-maven/akka-javasdk-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml index 0f2c3e0ee..37a5c24c7 100644 --- a/akka-javasdk-maven/akka-javasdk-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/akka-javasdk-maven/akka-javasdk-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -13,7 +13,7 @@ - src/it/java + src/test/java **/* diff --git a/akka-javasdk-maven/akka-javasdk-archetype/src/main/resources/archetype-resources/src/it/java/__packageInPathFormat__/IntegrationTest.java b/akka-javasdk-maven/akka-javasdk-archetype/src/main/resources/archetype-resources/src/test/java/__packageInPathFormat__/IntegrationTest.java similarity index 100% rename from akka-javasdk-maven/akka-javasdk-archetype/src/main/resources/archetype-resources/src/it/java/__packageInPathFormat__/IntegrationTest.java rename to akka-javasdk-maven/akka-javasdk-archetype/src/main/resources/archetype-resources/src/test/java/__packageInPathFormat__/IntegrationTest.java diff --git a/akka-javasdk-maven/akka-javasdk-parent/pom.xml b/akka-javasdk-maven/akka-javasdk-parent/pom.xml index aea13d67b..088cae285 100644 --- a/akka-javasdk-maven/akka-javasdk-parent/pom.xml +++ b/akka-javasdk-maven/akka-javasdk-parent/pom.xml @@ -73,12 +73,6 @@ - - - ${basedir}/src/main/resources - - - kr.motd.maven @@ -284,7 +278,27 @@ - + + org.apache.maven.plugins + maven-failsafe-plugin + ${maven-failsafe-plugin.version} + + + + integration-test + + + + **/*IntegrationTest.java + **/*IT.java + **/IT*.java + **/*ITCase.java + + -Dlogback.configurationFile=${logback.configurationFile} -Dakka.javasdk.dev-mode.project-artifact-id=${project.artifactId} + + + + org.apache.maven.plugins maven-deploy-plugin @@ -334,6 +348,11 @@ org.apache.maven.plugins maven-surefire-plugin + + + org.apache.maven.plugins + maven-failsafe-plugin + org.apache.maven.plugins @@ -359,36 +378,30 @@ - it - - org.apache.maven.plugins - maven-failsafe-plugin - ${maven-failsafe-plugin.version} + org.codehaus.gmaven + groovy-maven-plugin + 2.1.1 + integration-test - integration-test - verify + execute - - **/*IntegrationTest - - -Dlogback.configurationFile=${logback.configurationFile} -Dakka.javasdk.dev-mode.project-artifact-id=${project.artifactId} + + log.warn('The 'it' profile is deprecated. It will be removed in future versions. Integration tests only need `mvn integration-test` to run.') + - - ${project.build.outputDirectory} - - + clean-on-missing-descriptor diff --git a/docs/src/modules/java/pages/access-control.adoc b/docs/src/modules/java/pages/access-control.adoc index 45569d03f..47bbe650b 100644 --- a/docs/src/modules/java/pages/access-control.adoc +++ b/docs/src/modules/java/pages/access-control.adoc @@ -225,9 +225,9 @@ ACL rules will be applied whenever a call is made using testkit's `HttpClient`. originating from the internet. You can disable the ACL checks by overriding the `testKitSettings()` method. [source, java, indent=0] -.{sample-base-url}/doc-snippets/src/it/java/com/example/acl/UserEndpointIntegrationTest.java[UserEndpointIntegrationTest.java] +.{sample-base-url}/doc-snippets/src/test/java/com/example/acl/UserEndpointIntegrationTest.java[UserEndpointIntegrationTest.java] ---- -include::example$doc-snippets/src/it/java/com/example/acl/UserEndpointIntegrationTest.java[tag=disable-acl-in-it] +include::example$doc-snippets/src/test/java/com/example/acl/UserEndpointIntegrationTest.java[tag=disable-acl-in-it] ---- Calls made through the `ComponentClient` are internal to the service and therefore no ACL rule is applied. diff --git a/docs/src/modules/java/pages/auth-with-jwts.adoc b/docs/src/modules/java/pages/auth-with-jwts.adoc index a5901e741..d6ad73346 100644 --- a/docs/src/modules/java/pages/auth-with-jwts.adoc +++ b/docs/src/modules/java/pages/auth-with-jwts.adoc @@ -109,9 +109,9 @@ When running locally, by default, a dev key with id `dev` is configured for use. When running integration tests, JWTs will still be enforced but its signature will not be validated, similarly to what is described above for when running locally. Thus, when making calls in the context of integration testing, make sure to inject a proper token with the required claims, as shown below: [source, java, indent=0] -.{sample-base-url}/endpoint-jwt/src/it/java/hellojwt/api/HelloJwtIntegrationTest.java[HelloJwtIntegrationTest.java] +.{sample-base-url}/endpoint-jwt/src/test/java/hellojwt/api/HelloJwtIntegrationTest.java[HelloJwtIntegrationTest.java] ---- -include::example$endpoint-jwt/src/it/java/hellojwt/api/HelloJwtIntegrationTest.java[tag=bearer-token-claims-test] +include::example$endpoint-jwt/src/test/java/hellojwt/api/HelloJwtIntegrationTest.java[tag=bearer-token-claims-test] ---- <1> Use a helper method to create a JWT token with 2 claims: issuer and subject. <2> Inject the bearer token as header with the key `Authorization`. diff --git a/docs/src/modules/java/pages/consuming-producing.adoc b/docs/src/modules/java/pages/consuming-producing.adoc index e1aa74a96..348c70aa1 100644 --- a/docs/src/modules/java/pages/consuming-producing.adoc +++ b/docs/src/modules/java/pages/consuming-producing.adoc @@ -234,9 +234,9 @@ In this example: To test this flow, we will take advantage of the TestKit to be able to push commands into the `event-commands` topic and check what messages are produced to topic `counter-events`. [source,java] -.{sample-base-url}/event-sourced-counter-brokers/src/it/java/counter/application/CounterIntegrationTest.java[CounterIntegrationTest.java] +.{sample-base-url}/event-sourced-counter-brokers/src/test/java/counter/application/CounterIntegrationTest.java[CounterIntegrationTest.java] ---- -include::example$event-sourced-counter-brokers/src/it/java/counter/application/CounterIntegrationTest.java[tags=class;test-topic] +include::example$event-sourced-counter-brokers/src/test/java/counter/application/CounterIntegrationTest.java[tags=class;test-topic] ---- <1> Use the TestKitSupport class. <2> Get a `IncomingMessages` for topic named `counter-commands` and `OutgoingMessages` for `counter-events` from the TestKit. @@ -251,9 +251,9 @@ TIP: In the example above we take advantage of the TestKit to serialize / deseri Before running your test, make sure to configure the TestKit correctly. [source, java] -.{sample-base-url}/event-sourced-counter-brokers/src/it/java/counter/application/CounterIntegrationTest.java[CounterIntegrationTest.java] +.{sample-base-url}/event-sourced-counter-brokers/src/test/java/counter/application/CounterIntegrationTest.java[CounterIntegrationTest.java] ---- -include::example$event-sourced-counter-brokers/src/it/java/counter/application/CounterIntegrationTest.java[tags=eventing-config] +include::example$event-sourced-counter-brokers/src/test/java/counter/application/CounterIntegrationTest.java[tags=eventing-config] ---- <1> Mock incoming messages from the `counter-commands` topic. <2> Mock outgoing messages from the `counter-events` topic. @@ -263,9 +263,9 @@ include::example$event-sourced-counter-brokers/src/it/java/counter/application/C Typically, messages are published with associated metadata. If you want to construct your own `Metadata` to be consumed by a service or make sure the messages published out of your service have specific metadata attached, you can do so using the TestKit, as shown below. [source,java,indent=0] -.{sample-base-url}/event-sourced-counter-brokers/src/it/java/counter/application/CounterIntegrationTest.java[CounterIntegrationTest.java] +.{sample-base-url}/event-sourced-counter-brokers/src/test/java/counter/application/CounterIntegrationTest.java[CounterIntegrationTest.java] ---- -include::example$event-sourced-counter-brokers/src/it/java/counter/application/CounterIntegrationTest.java[tags=test-topic-metadata] +include::example$event-sourced-counter-brokers/src/test/java/counter/application/CounterIntegrationTest.java[tags=test-topic-metadata] ---- <1> Build a `CloudEvent` object with the 3 required attributes, respectively: `id`, `source` and `type`. <2> Add the subject to which the message is related, that is the `counterId`. @@ -286,9 +286,9 @@ As an alternative, you can consider using different test suites which will use i [source,java,indent=0] -.{sample-base-url}/event-sourced-counter-brokers/src/it/java/counter/application/CounterIntegrationTest.java[CounterIntegrationTest.java] +.{sample-base-url}/event-sourced-counter-brokers/src/test/java/counter/application/CounterIntegrationTest.java[CounterIntegrationTest.java] ---- -include::example$event-sourced-counter-brokers/src/it/java/counter/application/CounterIntegrationTest.java[tags=clear-topics] +include::example$event-sourced-counter-brokers/src/test/java/counter/application/CounterIntegrationTest.java[tags=clear-topics] ---- <1> Run this before each test. <2> Clear the topic ignoring any unread messages. @@ -300,9 +300,9 @@ NOTE: Despite the example, you are neither forced to clear all topics nor to do To run an integration test against a real instance of Google PubSub (or its Emulator) or Kafka, use the TestKit settings to override the default eventing support, as shown below: [source,java] -.{sample-base-url}/event-sourced-counter-brokers/src/it/java/counter/application/CounterWithRealKafkaIntegrationTest.java[CounterWithRealKafkaIntegrationTest.java] +.{sample-base-url}/event-sourced-counter-brokers/src/test/java/counter/application/CounterWithRealKafkaIntegrationTest.java[CounterWithRealKafkaIntegrationTest.java] ---- -include::example$event-sourced-counter-brokers/src/it/java/counter/application/CounterWithRealKafkaIntegrationTest.java[tags=kafka] +include::example$event-sourced-counter-brokers/src/test/java/counter/application/CounterWithRealKafkaIntegrationTest.java[tags=kafka] ---- == Multi-region replication diff --git a/docs/src/modules/java/pages/event-sourced-entities.adoc b/docs/src/modules/java/pages/event-sourced-entities.adoc index 4b6cfac38..c03b0964e 100644 --- a/docs/src/modules/java/pages/event-sourced-entities.adoc +++ b/docs/src/modules/java/pages/event-sourced-entities.adoc @@ -229,9 +229,9 @@ For the above example, this class provides access to all the command handlers of The skeleton of an Integration Test is generated for you if you use the archetype to start your Akka service. Let's see what it could look like to test our `ShoppingCartEntity`: [source,java] -.{sample-base-url}/shopping-cart-quickstart/src/it/java/shoppingcart/IntegrationTest.java[IntegrationTest.java] +.{sample-base-url}/shopping-cart-quickstart/src/test/java/shoppingcart/ShoppingCartIntegrationTest.java[ShoppingCartIntegrationTest.java] ---- -include::example$shopping-cart-quickstart/src/it/java/shoppingcart/IntegrationTest.java[tag=sample-it] +include::example$shopping-cart-quickstart/src/test/java/shoppingcart/ShoppingCartIntegrationTest.java[tag=sample-it] ---- <1> Note the test class must extend `TestKitSupport`. <2> A built-in component client is provided to interact with the components. @@ -240,8 +240,7 @@ include::example$shopping-cart-quickstart/src/it/java/shoppingcart/IntegrationTe <5> Request to retrieve current status of the shopping cart. <6> Assert there should only be one item. -NOTE: The integration tests in samples are under a specific project profile `it` and can be run using `mvn verify -Pit`. - +NOTE: The integration tests in samples can be run using `mvn integration-test`. == Exposing entities directly include::partial$component-endpoint.adoc[] diff --git a/docs/src/modules/java/pages/key-value-entities.adoc b/docs/src/modules/java/pages/key-value-entities.adoc index 42ce4a0b7..7991e1e01 100644 --- a/docs/src/modules/java/pages/key-value-entities.adoc +++ b/docs/src/modules/java/pages/key-value-entities.adoc @@ -150,9 +150,9 @@ NOTE: The `KeyValueEntityTestKit` is stateful, and it holds the state of a singl The skeleton of an Integration Test is generated for you if you use the archetype to start your Akka service. Let's see what it could look like to test our Counter Entity: [source,java,indent=0] -.{sample-base-url}/key-value-counter/src/it/java/com/example/CounterIntegrationTest.java[CounterIntegrationTest.java] +.{sample-base-url}/key-value-counter/src/test/java/com/example/CounterIntegrationTest.java[CounterIntegrationTest.java] ---- -include::example$key-value-counter/src/it/java/com/example/CounterIntegrationTest.java[tags=sample-it] +include::example$key-value-counter/src/test/java/com/example/CounterIntegrationTest.java[tags=sample-it] ---- <1> Note the test class must extend `TestKitSupport`. <2> A built-in component client is provided to interact with the components. @@ -160,7 +160,7 @@ include::example$key-value-counter/src/it/java/com/example/CounterIntegrationTes <4> Request to increase the value of counter `bar`. Response should have value `1`. <5> Explicitly request current value of `bar`. It should be `1`. -NOTE: The integration tests in samples are under a specific project profile `it` and can be run using `mvn verify -Pit`. +NOTE: The integration tests in samples can be run using `mvn integration-test`. == Exposing entities directly diff --git a/docs/src/modules/java/pages/setup-and-dependency-injection.adoc b/docs/src/modules/java/pages/setup-and-dependency-injection.adoc index bb1380728..71164739e 100644 --- a/docs/src/modules/java/pages/setup-and-dependency-injection.adoc +++ b/docs/src/modules/java/pages/setup-and-dependency-injection.adoc @@ -113,9 +113,9 @@ The TestKit allows providing a custom `DependencyProvider` through `TestKit.Sett that mock instances of dependencies can be used in tests. [source,java] -.{sample-base-url}/doc-snippets/src/it/java/com/example/MyIntegrationTest.java[MyIntegrationTest.java] +.{sample-base-url}/doc-snippets/src/test/java/com/example/MyIntegrationTest.java[MyIntegrationTest.java] ---- -include::example$doc-snippets/src/it/java/com/example/MyIntegrationTest.java[tag=test-di-provider] +include::example$doc-snippets/src/test/java/com/example/MyIntegrationTest.java[tag=test-di-provider] ---- <1> Implement a test specific `DependencyProvider`. <2> Configure the TestKit to use it. diff --git a/docs/src/modules/java/pages/views.adoc b/docs/src/modules/java/pages/views.adoc index ac9dde53e..f158fa648 100644 --- a/docs/src/modules/java/pages/views.adoc +++ b/docs/src/modules/java/pages/views.adoc @@ -304,9 +304,9 @@ include::example$key-value-customer-registry/src/main/java/customer/application/ An integration test can be implemented as below. [source,java,indent=0] -.{sample-base-url}/key-value-customer-registry/src/it/java/customer/application/CustomersByCityIntegrationTest.java[CustomersByCityIntegrationTest.java] +.{sample-base-url}/key-value-customer-registry/src/test/java/customer/application/CustomersByCityIntegrationTest.java[CustomersByCityIntegrationTest.java] ---- -include::example$key-value-customer-registry/src/it/java/customer/application/CustomersByCityIntegrationTest.java[tag=view-test] +include::example$key-value-customer-registry/src/test/java/customer/application/CustomersByCityIntegrationTest.java[tag=view-test] ---- <1> Mocks incoming messages from the `customer` Key Value Entity. <2> Gets an `IncomingMessages` from the `customer` Key Value Entity. diff --git a/samples/choreography-saga-quickstart/src/it/java/user/registry/UserCreationIntegrationTest.java b/samples/choreography-saga-quickstart/src/test/java/user/registry/UserCreationIntegrationTest.java similarity index 100% rename from samples/choreography-saga-quickstart/src/it/java/user/registry/UserCreationIntegrationTest.java rename to samples/choreography-saga-quickstart/src/test/java/user/registry/UserCreationIntegrationTest.java diff --git a/samples/choreography-saga-quickstart/src/it/resources/application.conf b/samples/choreography-saga-quickstart/src/test/resources/application.conf similarity index 100% rename from samples/choreography-saga-quickstart/src/it/resources/application.conf rename to samples/choreography-saga-quickstart/src/test/resources/application.conf diff --git a/samples/doc-snippets/src/it/java/com/example/MyIntegrationTest.java b/samples/doc-snippets/src/test/java/com/example/MyIntegrationTest.java similarity index 100% rename from samples/doc-snippets/src/it/java/com/example/MyIntegrationTest.java rename to samples/doc-snippets/src/test/java/com/example/MyIntegrationTest.java diff --git a/samples/doc-snippets/src/it/java/com/example/acl/UserEndpointIntegrationTest.java b/samples/doc-snippets/src/test/java/com/example/acl/UserEndpointIntegrationTest.java similarity index 100% rename from samples/doc-snippets/src/it/java/com/example/acl/UserEndpointIntegrationTest.java rename to samples/doc-snippets/src/test/java/com/example/acl/UserEndpointIntegrationTest.java diff --git a/samples/doc-snippets/src/it/java/com/example/jwt/JwtIntegrationTest.java b/samples/doc-snippets/src/test/java/com/example/jwt/JwtIntegrationTest.java similarity index 100% rename from samples/doc-snippets/src/it/java/com/example/jwt/JwtIntegrationTest.java rename to samples/doc-snippets/src/test/java/com/example/jwt/JwtIntegrationTest.java diff --git a/samples/endpoint-jwt/src/it/java/hellojwt/api/HelloJwtIntegrationTest.java b/samples/endpoint-jwt/src/test/java/hellojwt/api/HelloJwtIntegrationTest.java similarity index 100% rename from samples/endpoint-jwt/src/it/java/hellojwt/api/HelloJwtIntegrationTest.java rename to samples/endpoint-jwt/src/test/java/hellojwt/api/HelloJwtIntegrationTest.java diff --git a/samples/event-sourced-counter-brokers/README.md b/samples/event-sourced-counter-brokers/README.md index 3d9be0888..6c5b88fd8 100644 --- a/samples/event-sourced-counter-brokers/README.md +++ b/samples/event-sourced-counter-brokers/README.md @@ -102,5 +102,5 @@ docker-compose up Then run: ```shell -mvn verify -Pit +mvn integration-test ``` diff --git a/samples/event-sourced-counter-brokers/src/it/java/counter/application/CounterIntegrationTest.java b/samples/event-sourced-counter-brokers/src/test/java/counter/application/CounterIntegrationTest.java similarity index 100% rename from samples/event-sourced-counter-brokers/src/it/java/counter/application/CounterIntegrationTest.java rename to samples/event-sourced-counter-brokers/src/test/java/counter/application/CounterIntegrationTest.java diff --git a/samples/event-sourced-counter-brokers/src/it/java/counter/application/CounterWithRealKafkaIntegrationTest.java b/samples/event-sourced-counter-brokers/src/test/java/counter/application/CounterWithRealKafkaIntegrationTest.java similarity index 98% rename from samples/event-sourced-counter-brokers/src/it/java/counter/application/CounterWithRealKafkaIntegrationTest.java rename to samples/event-sourced-counter-brokers/src/test/java/counter/application/CounterWithRealKafkaIntegrationTest.java index a09f3e13e..c68fc9b56 100644 --- a/samples/event-sourced-counter-brokers/src/it/java/counter/application/CounterWithRealKafkaIntegrationTest.java +++ b/samples/event-sourced-counter-brokers/src/test/java/counter/application/CounterWithRealKafkaIntegrationTest.java @@ -11,7 +11,6 @@ import org.apache.kafka.common.serialization.ByteArrayDeserializer; import org.apache.kafka.common.serialization.StringDeserializer; import org.awaitility.Awaitility; -import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.Test; import java.nio.charset.StandardCharsets; diff --git a/samples/event-sourced-counter-brokers/src/it/java/counter/application/CounterWithRealPubSubIntegrationTest.java b/samples/event-sourced-counter-brokers/src/test/java/counter/application/CounterWithRealPubSubIntegrationTest.java similarity index 98% rename from samples/event-sourced-counter-brokers/src/it/java/counter/application/CounterWithRealPubSubIntegrationTest.java rename to samples/event-sourced-counter-brokers/src/test/java/counter/application/CounterWithRealPubSubIntegrationTest.java index 9880e3865..fad641511 100644 --- a/samples/event-sourced-counter-brokers/src/it/java/counter/application/CounterWithRealPubSubIntegrationTest.java +++ b/samples/event-sourced-counter-brokers/src/test/java/counter/application/CounterWithRealPubSubIntegrationTest.java @@ -2,7 +2,6 @@ import akka.http.javadsl.model.ContentTypes; import akka.http.javadsl.model.StatusCodes; -import akka.javasdk.http.HttpClient; import akka.javasdk.testkit.TestKitSupport; import akka.javasdk.testkit.TestKit; import org.awaitility.Awaitility; diff --git a/samples/event-sourced-customer-registry-subscriber/src/it/java/customer/api/CustomerIntegrationTest.java b/samples/event-sourced-customer-registry-subscriber/src/test/java/customer/api/CustomerIntegrationTest.java similarity index 100% rename from samples/event-sourced-customer-registry-subscriber/src/it/java/customer/api/CustomerIntegrationTest.java rename to samples/event-sourced-customer-registry-subscriber/src/test/java/customer/api/CustomerIntegrationTest.java diff --git a/samples/event-sourced-customer-registry-subscriber/src/it/java/customer/api/CustomerRegistryIntegrationTest.java b/samples/event-sourced-customer-registry-subscriber/src/test/java/customer/api/CustomerRegistryIntegrationTest.java similarity index 100% rename from samples/event-sourced-customer-registry-subscriber/src/it/java/customer/api/CustomerRegistryIntegrationTest.java rename to samples/event-sourced-customer-registry-subscriber/src/test/java/customer/api/CustomerRegistryIntegrationTest.java diff --git a/samples/event-sourced-customer-registry-subscriber/src/it/java/customer/api/CustomersByNameViewIntegrationTest.java b/samples/event-sourced-customer-registry-subscriber/src/test/java/customer/api/CustomersByNameViewIntegrationTest.java similarity index 100% rename from samples/event-sourced-customer-registry-subscriber/src/it/java/customer/api/CustomersByNameViewIntegrationTest.java rename to samples/event-sourced-customer-registry-subscriber/src/test/java/customer/api/CustomersByNameViewIntegrationTest.java diff --git a/samples/event-sourced-customer-registry/src/it/java/customer/api/CustomerIntegrationTest.java b/samples/event-sourced-customer-registry/src/test/java/customer/api/CustomerIntegrationTest.java similarity index 100% rename from samples/event-sourced-customer-registry/src/it/java/customer/api/CustomerIntegrationTest.java rename to samples/event-sourced-customer-registry/src/test/java/customer/api/CustomerIntegrationTest.java diff --git a/samples/key-value-counter/src/it/java/com/example/CounterIntegrationTest.java b/samples/key-value-counter/src/test/java/com/example/CounterIntegrationTest.java similarity index 100% rename from samples/key-value-counter/src/it/java/com/example/CounterIntegrationTest.java rename to samples/key-value-counter/src/test/java/com/example/CounterIntegrationTest.java diff --git a/samples/key-value-customer-registry/src/it/java/customer/CustomerIntegrationTest.java b/samples/key-value-customer-registry/src/test/java/customer/CustomerIntegrationTest.java similarity index 100% rename from samples/key-value-customer-registry/src/it/java/customer/CustomerIntegrationTest.java rename to samples/key-value-customer-registry/src/test/java/customer/CustomerIntegrationTest.java diff --git a/samples/key-value-customer-registry/src/it/java/customer/application/CustomersByCityIntegrationTest.java b/samples/key-value-customer-registry/src/test/java/customer/application/CustomersByCityIntegrationTest.java similarity index 100% rename from samples/key-value-customer-registry/src/it/java/customer/application/CustomersByCityIntegrationTest.java rename to samples/key-value-customer-registry/src/test/java/customer/application/CustomersByCityIntegrationTest.java diff --git a/samples/key-value-shopping-cart/src/it/java/com/example/IntegrationTest.java b/samples/key-value-shopping-cart/src/test/java/com/example/ShoppingCartIntegrationTest.java similarity index 98% rename from samples/key-value-shopping-cart/src/it/java/com/example/IntegrationTest.java rename to samples/key-value-shopping-cart/src/test/java/com/example/ShoppingCartIntegrationTest.java index c8932a36b..ad6a7a5c8 100644 --- a/samples/key-value-shopping-cart/src/it/java/com/example/IntegrationTest.java +++ b/samples/key-value-shopping-cart/src/test/java/com/example/ShoppingCartIntegrationTest.java @@ -15,7 +15,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; -public class IntegrationTest extends TestKitSupport { +public class ShoppingCartIntegrationTest extends TestKitSupport { private Duration timeout = Duration.of(5, SECONDS); diff --git a/samples/reliable-timers/src/it/java/com/example/OrderEndpointIntegrationTest.java b/samples/reliable-timers/src/test/java/com/example/OrderEndpointIntegrationTest.java similarity index 100% rename from samples/reliable-timers/src/it/java/com/example/OrderEndpointIntegrationTest.java rename to samples/reliable-timers/src/test/java/com/example/OrderEndpointIntegrationTest.java diff --git a/samples/shopping-cart-quickstart/src/it/java/shoppingcart/IntegrationTest.java b/samples/shopping-cart-quickstart/src/test/java/shoppingcart/ShoppingCartIntegrationTest.java similarity index 96% rename from samples/shopping-cart-quickstart/src/it/java/shoppingcart/IntegrationTest.java rename to samples/shopping-cart-quickstart/src/test/java/shoppingcart/ShoppingCartIntegrationTest.java index e5cdd2ab5..fdc5b43e1 100644 --- a/samples/shopping-cart-quickstart/src/it/java/shoppingcart/IntegrationTest.java +++ b/samples/shopping-cart-quickstart/src/test/java/shoppingcart/ShoppingCartIntegrationTest.java @@ -8,7 +8,7 @@ import shoppingcart.domain.ShoppingCart.LineItem; // tag::sample-it[] -public class IntegrationTest extends TestKitSupport { // <1> +public class ShoppingCartIntegrationTest extends TestKitSupport { // <1> @Test public void createAndManageCart() { diff --git a/samples/spring-dependency-injection/src/it/java/com/example/CounterIntegrationTest.java b/samples/spring-dependency-injection/src/test/java/com/example/CounterIntegrationTest.java similarity index 100% rename from samples/spring-dependency-injection/src/it/java/com/example/CounterIntegrationTest.java rename to samples/spring-dependency-injection/src/test/java/com/example/CounterIntegrationTest.java diff --git a/samples/spring-dependency-injection/src/it/java/com/example/FixedClock.java b/samples/spring-dependency-injection/src/test/java/com/example/FixedClock.java similarity index 100% rename from samples/spring-dependency-injection/src/it/java/com/example/FixedClock.java rename to samples/spring-dependency-injection/src/test/java/com/example/FixedClock.java diff --git a/samples/spring-dependency-injection/src/it/java/com/example/TestEmailSender.java b/samples/spring-dependency-injection/src/test/java/com/example/TestEmailSender.java similarity index 100% rename from samples/spring-dependency-injection/src/it/java/com/example/TestEmailSender.java rename to samples/spring-dependency-injection/src/test/java/com/example/TestEmailSender.java diff --git a/samples/spring-dependency-injection/src/it/resources/application.properties b/samples/spring-dependency-injection/src/test/resources/application.properties similarity index 100% rename from samples/spring-dependency-injection/src/it/resources/application.properties rename to samples/spring-dependency-injection/src/test/resources/application.properties diff --git a/samples/tracing/src/it/java/com/example/IntegrationTest.java b/samples/tracing/src/test/java/com/example/TracingIntegrationTest.java similarity index 86% rename from samples/tracing/src/it/java/com/example/IntegrationTest.java rename to samples/tracing/src/test/java/com/example/TracingIntegrationTest.java index 77a1dede0..0061c3c27 100644 --- a/samples/tracing/src/it/java/com/example/IntegrationTest.java +++ b/samples/tracing/src/test/java/com/example/TracingIntegrationTest.java @@ -8,7 +8,7 @@ import static java.time.temporal.ChronoUnit.SECONDS; -public class IntegrationTest extends TestKitSupport { +public class TracingIntegrationTest extends TestKitSupport { private Duration timeout = Duration.of(5, SECONDS); diff --git a/samples/transfer-workflow-compensation/README.md b/samples/transfer-workflow-compensation/README.md index 2481cd05e..3a32936ea 100644 --- a/samples/transfer-workflow-compensation/README.md +++ b/samples/transfer-workflow-compensation/README.md @@ -101,10 +101,10 @@ curl http://localhost:9000/transfer/1 ## Run integration tests -To run the integration tests located in `src/it/java`: +To run the integration tests located in `src/test/java`: ```shell -mvn verify -Pit +mvn integration-test ``` ## Troubleshooting diff --git a/samples/transfer-workflow-compensation/src/it/java/com/example/transfer/TransferWorkflowIntegrationTest.java b/samples/transfer-workflow-compensation/src/test/java/com/example/transfer/TransferWorkflowIntegrationTest.java similarity index 100% rename from samples/transfer-workflow-compensation/src/it/java/com/example/transfer/TransferWorkflowIntegrationTest.java rename to samples/transfer-workflow-compensation/src/test/java/com/example/transfer/TransferWorkflowIntegrationTest.java diff --git a/samples/transfer-workflow-compensation/src/it/java/com/example/wallet/application/WalletEntityIntegrationTest.java b/samples/transfer-workflow-compensation/src/test/java/com/example/wallet/application/WalletEntityIntegrationTest.java similarity index 100% rename from samples/transfer-workflow-compensation/src/it/java/com/example/wallet/application/WalletEntityIntegrationTest.java rename to samples/transfer-workflow-compensation/src/test/java/com/example/wallet/application/WalletEntityIntegrationTest.java diff --git a/samples/transfer-workflow-compensation/src/it/java/com/example/wallet/domain/WalletTest.java b/samples/transfer-workflow-compensation/src/test/java/com/example/wallet/domain/WalletTest.java similarity index 100% rename from samples/transfer-workflow-compensation/src/it/java/com/example/wallet/domain/WalletTest.java rename to samples/transfer-workflow-compensation/src/test/java/com/example/wallet/domain/WalletTest.java diff --git a/samples/transfer-workflow/README.md b/samples/transfer-workflow/README.md index d6d1ca87f..cfcc898fe 100644 --- a/samples/transfer-workflow/README.md +++ b/samples/transfer-workflow/README.md @@ -103,10 +103,10 @@ curl http://localhost:9000/transfer/1 ## Run integration tests -To run the integration tests located in `src/it/java`: +To run the integration tests located in `src/test/java`: ```shell -mvn verify -Pit +mvn integration-test ``` ## Troubleshooting diff --git a/samples/transfer-workflow/src/it/java/com/example/transfer/TransferWorkflowIntegrationTest.java b/samples/transfer-workflow/src/test/java/com/example/transfer/TransferWorkflowIntegrationTest.java similarity index 100% rename from samples/transfer-workflow/src/it/java/com/example/transfer/TransferWorkflowIntegrationTest.java rename to samples/transfer-workflow/src/test/java/com/example/transfer/TransferWorkflowIntegrationTest.java diff --git a/samples/view-store/src/it/java/store/view/StoreViewIntegrationTest.java b/samples/view-store/src/test/java/store/view/StoreViewIntegrationTest.java similarity index 100% rename from samples/view-store/src/it/java/store/view/StoreViewIntegrationTest.java rename to samples/view-store/src/test/java/store/view/StoreViewIntegrationTest.java diff --git a/samples/view-store/src/it/java/store/view/joined/JoinedCustomerOrdersViewIntegrationTest.java b/samples/view-store/src/test/java/store/view/joined/JoinedCustomerOrdersViewIntegrationTest.java similarity index 100% rename from samples/view-store/src/it/java/store/view/joined/JoinedCustomerOrdersViewIntegrationTest.java rename to samples/view-store/src/test/java/store/view/joined/JoinedCustomerOrdersViewIntegrationTest.java diff --git a/samples/view-store/src/it/java/store/view/nested/NestedCustomerOrdersViewIntegrationTest.java b/samples/view-store/src/test/java/store/view/nested/NestedCustomerOrdersViewIntegrationTest.java similarity index 100% rename from samples/view-store/src/it/java/store/view/nested/NestedCustomerOrdersViewIntegrationTest.java rename to samples/view-store/src/test/java/store/view/nested/NestedCustomerOrdersViewIntegrationTest.java diff --git a/samples/view-store/src/it/java/store/view/structured/StructuredCustomerOrdersViewIntegrationTest.java b/samples/view-store/src/test/java/store/view/structured/StructuredCustomerOrdersViewIntegrationTest.java similarity index 100% rename from samples/view-store/src/it/java/store/view/structured/StructuredCustomerOrdersViewIntegrationTest.java rename to samples/view-store/src/test/java/store/view/structured/StructuredCustomerOrdersViewIntegrationTest.java From c8fc890ecdcba89d61e8c0c151e55c8574a5b14e Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Wed, 11 Dec 2024 14:05:25 +0100 Subject: [PATCH 5/6] docs: platform release notes (#75) --- docs/src/modules/reference/pages/release-notes.adoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/src/modules/reference/pages/release-notes.adoc b/docs/src/modules/reference/pages/release-notes.adoc index 35cddf42c..bc458ecec 100644 --- a/docs/src/modules/reference/pages/release-notes.adoc +++ b/docs/src/modules/reference/pages/release-notes.adoc @@ -12,6 +12,19 @@ Current versions == December 2024 +* Platform update 2024-12-10 + - New internal structure to capture usage data + - Updated email server for signup emails + - Updated JVM memory settings for services + - Akka Runtime 1.2.5 + - Better gRPC support for the CLI + - Console updates + ** Empty projects can now be deleted from the Console + - GCP: Updates of GKE node versions + +* Akka Runtime 1.2.5 + - Improves handling of `count(*)` in the view query language + * Akka CLI 3.0.7 - Improvements to the Local Console From e5beb95a5bee8125d92f59494361fba9bd006a62 Mon Sep 17 00:00:00 2001 From: Francisco Lopez-Sancho Date: Wed, 11 Dec 2024 21:06:18 +0800 Subject: [PATCH 6/6] docs: typo (#73) --- docs/src/modules/java/pages/consuming-producing.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/modules/java/pages/consuming-producing.adoc b/docs/src/modules/java/pages/consuming-producing.adoc index 348c70aa1..0ed3429e5 100644 --- a/docs/src/modules/java/pages/consuming-producing.adoc +++ b/docs/src/modules/java/pages/consuming-producing.adoc @@ -163,7 +163,7 @@ If a Consumer produce messages of `byte[]` type to a topic, the messages publish Producing to a topic is the same as producing to a stream in service to service eventing. The only difference is the `@Produce.ToTopic` annotation. Used to set a destination topic name. -IMPORTANT: To guarantee that events for each entity can be read from the message broker in the same order they were written the cloud event subject id must be specified in metadata along with the event. Se how to in xref:consuming-producing.adoc#_metadata[Metadata] below. +IMPORTANT: To guarantee that events for each entity can be read from the message broker in the same order they were written, the cloud event subject id must be specified in metadata along with the event. See how to in xref:consuming-producing.adoc#_metadata[Metadata] below. [source,java,indent=0] .{sample-base-url}/event-sourced-counter-brokers/src/main/java/counter/application/CounterJournalToTopicConsumer.java[CounterJournalToTopicConsumer.java]