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/LICENSE b/LICENSE index d0fe2e7f5..c429a1b5b 100644 --- a/LICENSE +++ b/LICENSE @@ -3,10 +3,10 @@ Business Source License 1.1 Parameters Licensor: Lightbend, Inc. -Licensed Work: Akka SDK for Java v 3.0.1 +Licensed Work: Akka SDK for Java v 3.0.2 The Licensed Work is (c) 2024 Lightbend Inc. -Change Date: 2027-12-03 +Change Date: 2027-12-12 Change License: Apache License, Version 2.0 diff --git a/Makefile b/Makefile index 38433e4da..93d0c8da7 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ attributes: prepare > "${managed_partials}/attributes.adoc" docs/bin/version.sh | xargs -0 printf ":akka-javasdk-version: %s" \ > "${managed_partials}/attributes.adoc" - echo ":akka-cli-version: 3.0.6" >> "${managed_partials}/attributes.adoc" + echo ":akka-cli-version: 3.0.8" >> "${managed_partials}/attributes.adoc" echo ":akka-cli-min-version: 3.0.4" >> "${managed_partials}/attributes.adoc" # see https://adoptium.net/marketplace/ echo ":java-version: 21" \ diff --git a/akka-javasdk-maven/akka-javasdk-archetype/pom.xml b/akka-javasdk-maven/akka-javasdk-archetype/pom.xml index a53bb3cc2..5a4b5ba09 100644 --- a/akka-javasdk-maven/akka-javasdk-archetype/pom.xml +++ b/akka-javasdk-maven/akka-javasdk-archetype/pom.xml @@ -2,12 +2,12 @@ 4.0.0 akka-javasdk-archetype - 3.0.1 + 3.0.2 maven-archetype io.akka akka-javasdk-maven - 3.0.1 + 3.0.2 Akka SDK for Java Maven Archetype 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 71c0e48eb..b67928835 100644 --- a/akka-javasdk-maven/akka-javasdk-parent/pom.xml +++ b/akka-javasdk-maven/akka-javasdk-parent/pom.xml @@ -7,12 +7,12 @@ io.akka akka-javasdk-maven - 3.0.1 + 3.0.2 io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 pom @@ -34,7 +34,7 @@ yyyyMMddHHmmss - 3.0.1 + 3.0.2 21 @@ -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 @@ -335,6 +349,11 @@ maven-surefire-plugin + + org.apache.maven.plugins + maven-failsafe-plugin + + org.apache.maven.plugins maven-deploy-plugin @@ -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/akka-javasdk-maven/pom.xml b/akka-javasdk-maven/pom.xml index 9b5bf8a6b..a45c42204 100644 --- a/akka-javasdk-maven/pom.xml +++ b/akka-javasdk-maven/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-maven - 3.0.1 + 3.0.2 pom Akka SDK for Java Maven diff --git a/akka-javasdk-testkit/src/main/java/akka/javasdk/testkit/TestKit.java b/akka-javasdk-testkit/src/main/java/akka/javasdk/testkit/TestKit.java index 34870403f..d3a8ca8a7 100644 --- a/akka-javasdk-testkit/src/main/java/akka/javasdk/testkit/TestKit.java +++ b/akka-javasdk-testkit/src/main/java/akka/javasdk/testkit/TestKit.java @@ -459,7 +459,7 @@ public SpiSettings getSettings() { proxyPort, settings.aclEnabled, false, - settings.serviceName, + settings.serviceName + "-IT-" + System.currentTimeMillis(), eventingSettings, mockedEventingSettings, true); diff --git a/akka-javasdk/src/main/scala/akka/javasdk/impl/SdkRunner.scala b/akka-javasdk/src/main/scala/akka/javasdk/impl/SdkRunner.scala index 1214b306d..9d6e4b852 100644 --- a/akka-javasdk/src/main/scala/akka/javasdk/impl/SdkRunner.scala +++ b/akka-javasdk/src/main/scala/akka/javasdk/impl/SdkRunner.scala @@ -167,7 +167,8 @@ class SdkRunner private (dependencyProvider: Option[DependencyProvider]) extends startContext.remoteIdentification, startContext.tracerFactory, dependencyProvider, - startedPromise) + startedPromise, + getSettings.devMode.map(_.serviceName)) Future.successful(app.spiComponents) } catch { case NonFatal(ex) => @@ -296,7 +297,8 @@ private final class Sdk( remoteIdentification: Option[RemoteIdentification], tracerFactory: String => Tracer, dependencyProviderOverride: Option[DependencyProvider], - startedPromise: Promise[StartupContext]) { + startedPromise: Promise[StartupContext], + serviceNameOverride: Option[String]) { private val logger = LoggerFactory.getLogger(getClass) private val serializer = new JsonSerializer private val ComponentLocator.LocatedClasses(componentClasses, maybeServiceClass) = @@ -617,7 +619,7 @@ private final class Sdk( override val serviceInfo: SpiServiceInfo = new SpiServiceInfo( - serviceName = sdkSettings.devModeSettings.map(_.serviceName).getOrElse(""), + serviceName = serviceNameOverride.orElse(sdkSettings.devModeSettings.map(_.serviceName)).getOrElse(""), sdkName = "java", sdkVersion = BuildInfo.version, protocolMajorVersion = BuildInfo.protocolMajorVersion, diff --git a/docs/src/modules/ROOT/partials/cli-install-short.adoc b/docs/src/modules/ROOT/partials/cli-install-short.adoc new file mode 100644 index 000000000..1eed185f0 --- /dev/null +++ b/docs/src/modules/ROOT/partials/cli-install-short.adoc @@ -0,0 +1,42 @@ +Install the Akka CLI: + +NOTE: In case there is any trouble with installing the CLI when following these instructions, please check xref:reference:cli/installation.adoc[]. + +[.tabset] +Linux:: ++ +-- +Download and install the latest version of `akka`: +[source,bash] +.... +curl -sL https://doc.akka.io/install-cli.sh | bash +.... + +-- +macOS:: ++ +-- +The recommended approach to install `akka` on macOS, is using https://brew.sh[brew, window="new"] + +[source,bash] +---- +brew install akka/brew/akka +---- + +-- +Windows:: ++ +-- + +. Download the latest version of `akka` from https://downloads.akka.io/latest/akka_windows_amd64.zip[https://downloads.akka.io/latest/akka_windows_amd64.zip] + +. Extract the zip file and move `akka.exe` to a location on your `%PATH%`. + +-- + +Verify that the Akka CLI has been installed successfully by running the following to list all available commands: + +[source, command window] +---- +akka help +---- diff --git a/docs/src/modules/java/images/hello-world-local-console.png b/docs/src/modules/java/images/hello-world-local-console.png new file mode 100644 index 000000000..7d9997340 Binary files /dev/null and b/docs/src/modules/java/images/hello-world-local-console.png differ 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/author-your-first-service.adoc b/docs/src/modules/java/pages/author-your-first-service.adoc index 60deccb4f..1ab0875bb 100644 --- a/docs/src/modules/java/pages/author-your-first-service.adoc +++ b/docs/src/modules/java/pages/author-your-first-service.adoc @@ -3,25 +3,24 @@ include::ROOT:partial$include.adoc[] -This guide will walk you through the process of setting up your development environment, generating a project, and implementing a simple "Hello World!" REST service. By the end, you will have a functional HTTP endpoint built with the Akka SDK running locally. +== Introduction -== Overview +In this guide, you will: -The Akka SDK comes with Maven support that enables you to get started quickly. In this guide, you will: - -* Use the Akka Maven archetype to generate a skeleton project that follows the recommended onion architecture. -* Understand how to use the Akka Maven parent POM to define dependencies and run your application locally. - -NOTE: If you'd rather skip past this and want to review an already completed application see the xref:java:shopping-cart-quickstart.adoc[]. +* Set up your development environment. +* Generate a simple project from a template that follows the recommended xref:concepts:architecture-model.adoc#_architecture[onion architecture]. +* Explore a basic HTTP Endpoint that responds with "Hello World!" +* Add path parameters, a request body and a response body to the Endpoint. +* Run your service locally. +* Explore the local console to observe your running service. == Prerequisites include::ROOT:partial$local-dev-prerequisites.adoc[] +== Generate and build the project -== Generate and build the skeleton project - -The Maven archetype template prompts you to specify the project's group ID, name and version interactively. Run it using the commands shown for your OS. +The Maven archetype template prompts you to specify the project's group ID, name and version interactively. Run it using the commands shown for your operating system. [sidebar] In IntelliJ, you can skip the command line. Open the IDE, select @@ -35,7 +34,7 @@ Follow these steps to generate and build your project: Linux or macOS:: + -- -[source,command line, subs="attributes"] +[source,command window, subs="attributes"] ---- mvn archetype:generate \ -DarchetypeGroupId=io.akka \ @@ -46,7 +45,7 @@ mvn archetype:generate \ Windows 10+:: + -- -[source,command line, subs="attributes"] +[source,command window, subs="attributes"] ---- mvn archetype:generate ^ -DarchetypeGroupId=io.akka ^ @@ -55,7 +54,8 @@ mvn archetype:generate ^ ---- -- -. Fill in ++ +.Fill in: * groupId: `com.example` * artifactId: `helloworld` * version: `1.0-SNAPSHOT` @@ -65,7 +65,13 @@ mvn archetype:generate ^ . Open it in your preferred IDE / Editor. -. Expand directory `src/main/java/com/example/api` and open the `HelloWorldEndpoint.java` file. +== Explore the HTTP Endpoint + +An _Endpoint_ is a component that creates an externally accessible API. Endpoints are how you expose your services to the outside world. Endpoints can have different protocols and, initially, support HTTP. + +HTTP Endpoint components make it possible to conveniently define such APIs accepting and responding in JSON, or dropping down to lower level APIs for ultimate flexibility in what types of data is accepted and returned. + +. Open the `src/main/java/com/example/api/HelloWorldEndpoint.java` file. The _Endpoint_ is implemented with: @@ -83,14 +89,9 @@ public class HelloWorldEndpoint { } ---- -== Basics -An _Endpoint_ is a component that creates an externally accessible API. Endpoints are how you expose your services to the outside world. Endpoints can have different protocols and, initially, support HTTP. +This Endpoint is on the path `/hello` and exposes an HTTP GET operation on `/`. -HTTP Endpoint components make it possible to conveniently define such APIs accepting and responding in JSON, or dropping down to lower level APIs for ultimate flexibility in what types of data is accepted and returned. - -This endpoint is on the path `/hello` and exposes an HTTP GET operation on `/`. - -You can also see that there is an _Access Control List_ (ACL) on this endpoint that allows all traffic from the Internet. Without this ACL the service would be unreachable, but you can be very expressive with these ACLs. +You can also see that there is an _Access Control List_ (ACL) on this Endpoint that allows all traffic from the Internet. Without this ACL the service would be unreachable, but you can be very expressive with these ACLs. == Run locally @@ -101,11 +102,11 @@ Start your service locally: mvn compile exec:java ---- -Once successfully started, any defined endpoints become available at `localhost:9000` and you will see an INFO message that the Akka Runtime has started. +Once successfully started, any defined Endpoints become available at `localhost:9000` and you will see an INFO message that the Akka Runtime has started. Your "Hello World" service is now running. -In another shell, you can now use `curl` to send requests to this endpoint. +In another shell, you can now use `curl` to send requests to this Endpoint. [source, command line] ---- @@ -118,12 +119,17 @@ Which will reply Hello World! ---- +== Getting more advanced + +In this section, you will modify the HTTP Endpoint to accept path parameters, a request body, and return a response body. + +=== Add path parameters + +The path can also contain one or more parameters, which are extracted and passed to the method. -== Getting more complex -Endpoints provide the common capabilities you would expect for creating REST services. Here are a few more: +Path parameters can be of type `String`, `int`, `long`, `boolean`, `float`, `double`, `short` or `char`, as well as their `java.lang` class counterparts. -=== Path parameters === -The path can also contain one or more parameters, which are extracted and passed to the method: +Add path parameters to the Endpoint using the code shown below: [source,java] .HelloWorldEndpoint.java @@ -135,10 +141,7 @@ include::example$doc-snippets/src/main/java/com/example/api/ExampleEndpoint.java <3> When there are multiple parameters <4> The method must accept all the same names in the same order as in the path expression. -Path parameter can be of types `String`, `int`, `long`, `boolean`, `float`, `double`, `short` and `char` as well -as their `java.lang` class counterparts. - -If you add this code above to `HelloWorldEndpoint.java` and restart the service, you can now curl these commands: +Restart the service and curl these commands: [source, command line] ---- @@ -150,9 +153,9 @@ curl localhost:9000/hello/hello/Bob curl localhost:9000/hello/hello/Bob/30 ---- -=== Request body === +=== Add a request body -To accept an HTTP JSON body, specify a parameter that is a Java record. +Modify the Endpoint to accept an HTTP JSON body using the code shown below: [source,java] .HelloWorldEndpoint.java @@ -164,16 +167,17 @@ include::example$doc-snippets/src/main/java/com/example/api/ExampleEndpoint.java <3> When combining request body with path variables <4> The body must come last in the parameter list -You can now call these commands as well +Restart the service and curl this command: + [source, command line] ---- curl -i -XPOST -H "Content-Type: application/json" localhost:9000/hello/hello -d ' {"age":"30", "name":"Bob"}' ---- -=== Response body === +=== Add a response body -To return response with JSON, the return value can be a record that gets serialized as JSON: +Modify the Endpoint to return a response body using the code shown below: [source,java] .HelloWorldEndpoint.java @@ -182,10 +186,55 @@ include::example$doc-snippets/src/main/java/com/example/api/ExampleEndpoint.java ---- <1> Returning a record that gets serialized as JSON +Restart the service and curl this command: + [source, command line] ---- curl localhost:9000/hello/hello/Bob/30 ---- +== Explore the local console + +The Akka local console is a web-based tool that provides a convenient way to view and interact with your running service. + +=== Install the Akka CLI + +Starting the local console requires using the Akka CLI and Docker. + +include::ROOT:partial$cli-install-short.adoc[] + + +=== Start the local console + +. Start the local console. It will launch a Docker container: ++ +[source,bash] +---- +akka local console + +Pulling local console image, please wait... +---- + +. Once the console is running, you will see a message like this: + ++ +[source,bash] +---- +- helloworld is running at: localhost:9000 +----------------------------------------------------- +(use Ctrl+C to quit) +---- + +. You can then access the local console in your browser at: ++ +http://localhost:3000 + +. Navigate to your service's Endpoint, which will be available http://localhost:3000/services/akka-javasdk-archetype/components/io.akka.api.HelloWorldEndpoint[here, window="new"]. + +image:hello-world-local-console.png[] + +This is a simple Hello World service, so there isn't much to see here yet. However, as you build more complex services, the console will become a more valuable tool for monitoring and debugging. + == Next steps + Now that you have a basic service running, it's time to learn more about building real services in Akka. See the xref:java:shopping-cart-quickstart.adoc[] to build a more realistic application and learn how to deploy it to https://console.akka.io[akka.io]. diff --git a/docs/src/modules/java/pages/consuming-producing.adoc b/docs/src/modules/java/pages/consuming-producing.adoc index e1aa74a96..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] @@ -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 bb68aea4f..06fd93dd6 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,4 +240,4 @@ 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`. diff --git a/docs/src/modules/java/pages/key-value-entities.adoc b/docs/src/modules/java/pages/key-value-entities.adoc index aedf7a650..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,4 +160,24 @@ 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`. \ No newline at end of file +NOTE: The integration tests in samples can be run using `mvn integration-test`. + +== Exposing entities directly + +include::partial$component-endpoint.adoc[] + +=== API + +The entity is exposed at a fixed path: + +[source] +---- +/akka/v1.0/entity/// +---- + +In our counter example that is: + +[source,shell] +---- +curl localhost:9000/akka/v1.0/entity/counter/foo/get +---- 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/docs/src/modules/operations/pages/projects/container-registries.adoc b/docs/src/modules/operations/pages/projects/container-registries.adoc index abcb36d9b..1bc8892a3 100644 --- a/docs/src/modules/operations/pages/projects/container-registries.adoc +++ b/docs/src/modules/operations/pages/projects/container-registries.adoc @@ -9,7 +9,7 @@ Akka provides a built-in _Akka Container Registry (ACR)_ which is pre-configured == Akka Container Registry -The _Akka Container Registry (ACR)_ is available to all Akka users and supported across all Akka regions, allowing for easy, integrated deployments without dependency on external registry connectivity. Authentication is built-in, so deployments, restarts, and scaling operate independently from external networks. +The _Akka Container Registry (ACR)_ is available to all Akka users and supported across all Akka regions, allowing for easy, integrated deployments without dependency on external registry connectivity. Authentication is built-in, so deployments, restarts, and scaling operate independently of external networks. == Prerequisites diff --git a/docs/src/modules/reference/pages/cli/akka-cli/akka_auth_tokens_create.adoc b/docs/src/modules/reference/pages/cli/akka-cli/akka_auth_tokens_create.adoc index d85ff5870..bf7f58614 100644 --- a/docs/src/modules/reference/pages/cli/akka-cli/akka_auth_tokens_create.adoc +++ b/docs/src/modules/reference/pages/cli/akka-cli/akka_auth_tokens_create.adoc @@ -23,7 +23,8 @@ Token created: 0123456789abcdef0123456789abcdef0123456789abcdef ---- --description string A description of the token. If the token is a refresh token, this will be stored with the token for reference. -h, --help help for create - --scopes stringArray The scopes for the token. Valid scopes are: all, container_registry, execution, organizations, projects, user (default [execution]) + --scopes stringArray The scopes for the token. Valid scopes are: all, container_registry, execution, organizations, projects, user. Only applies to refresh tokens. (default [execution]) + --type string The type of token to create, either access or refresh (default "refresh") ---- == Options inherited from parent commands diff --git a/docs/src/modules/reference/pages/cli/akka-cli/akka_local_console.adoc b/docs/src/modules/reference/pages/cli/akka-cli/akka_local_console.adoc index 6a4087f5d..cd590cd09 100644 --- a/docs/src/modules/reference/pages/cli/akka-cli/akka_local_console.adoc +++ b/docs/src/modules/reference/pages/cli/akka-cli/akka_local_console.adoc @@ -14,7 +14,7 @@ akka local console [flags] ---- -h, --help help for console - --local-console-image string Override the local console image. (default "gcr.io/kalix-public/akka-local-console:d0ed8e0") + --local-console-image string Override the local console image. (default "gcr.io/kalix-public/akka-local-console:e349ebdc") ---- == Options inherited from parent commands diff --git a/docs/src/modules/reference/pages/cli/installation.adoc b/docs/src/modules/reference/pages/cli/installation.adoc index 92657ffd3..c0cd65534 100644 --- a/docs/src/modules/reference/pages/cli/installation.adoc +++ b/docs/src/modules/reference/pages/cli/installation.adoc @@ -24,10 +24,10 @@ curl -sL https://doc.akka.io/install-cli.sh | bash -s -- --prefix /tmp && \ You can pass options to the installer script with `-s --` e.g.: -[source,bash] +[source,bash,subs="attributes"] .... -curl -sL https://doc.akka.io/install-cli.sh | bash -s -- --prefix=$HOME --version=2.0.22 --verbose -curl -sL https://doc.akka.io/install-cli.sh | bash -s -- -P $HOME -v 2.0.22 -V +curl -sL https://doc.akka.io/install-cli.sh | bash -s -- --prefix=$HOME --version={akka-cli-version} --verbose +curl -sL https://doc.akka.io/install-cli.sh | bash -s -- -P $HOME -v {akka-cli-version} -V .... -- @@ -59,9 +59,10 @@ curl -sL https://doc.akka.io/install-cli.sh | bash You can pass options to the installer script with `-s --` e.g.: +[source,bash,subs="attributes"] .... -curl -sL https://doc.akka.io/install-cli.sh | bash -s -- --prefix=$HOME --version=2.0.22 --verbose -curl -sL https://doc.akka.io/install-cli.sh | bash -s -- -P $HOME -v 2.0.22 -V +curl -sL https://doc.akka.io/install-cli.sh | bash -s -- --prefix=$HOME --version={akka-cli-version} --verbose +curl -sL https://doc.akka.io/install-cli.sh | bash -s -- -P $HOME -v {akka-cli-version} -V .... -- Windows:: diff --git a/docs/src/modules/reference/pages/release-notes.adoc b/docs/src/modules/reference/pages/release-notes.adoc index 0ea50e466..2d60cdf59 100644 --- a/docs/src/modules/reference/pages/release-notes.adoc +++ b/docs/src/modules/reference/pages/release-notes.adoc @@ -12,6 +12,28 @@ Current versions == December 2024 +* Akka CLI 3.0.8 + - Updates to configure SSO integrations + +* https://github.com/akka/akka-sdk/releases/tag/v3.0.2[Akka SDK 3.0.2] + - Integration Tests are now bound to `mvn integration-test` and not a specific profile + +* 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 + * https://github.com/akka/akka-sdk/releases/tag/v3.0.1[Akka SDK 3.0.1] - Minor improvements diff --git a/docs/src/modules/support/nav.adoc b/docs/src/modules/support/nav.adoc index dcb24ff79..6fbe263f9 100644 --- a/docs/src/modules/support/nav.adoc +++ b/docs/src/modules/support/nav.adoc @@ -3,4 +3,8 @@ * xref:support:index.adoc[] ** xref:support:community-forum.adoc[] ** xref:support:email.adoc[] -** xref:support:platform-status.adoc[] \ No newline at end of file +** xref:support:frequently-asked-questions.adoc[] +** xref:support:paid-plans.adoc[] +** xref:support:platform-status.adoc[] +** xref:support:request-a-demo.adoc[] +** xref:support:troubleshooting.adoc[] diff --git a/docs/src/modules/support/pages/community-forum.adoc b/docs/src/modules/support/pages/community-forum.adoc index 1367e91ef..65536a2fe 100644 --- a/docs/src/modules/support/pages/community-forum.adoc +++ b/docs/src/modules/support/pages/community-forum.adoc @@ -12,4 +12,4 @@ include::ROOT:partial$include.adoc[] [sidebar] -https://discuss.akka.io/[Join the Akka Community Forum] \ No newline at end of file +https://discuss.akka.io/c/akka-sdk/43[Join the Akka Community Forum] diff --git a/docs/src/modules/support/pages/email.adoc b/docs/src/modules/support/pages/email.adoc index 9e9e19a61..569d45a1b 100644 --- a/docs/src/modules/support/pages/email.adoc +++ b/docs/src/modules/support/pages/email.adoc @@ -6,4 +6,4 @@ include::ROOT:partial$include.adoc[] Connect with a member of the Akka team for advice and support on your project. -Browse to https://www.akka.io/contact[https://www.akka.io/contact,window="new"], provide the necessary details and submit the form. A team member will reach out to you shortly. \ No newline at end of file +Browse to https://akka.io/contact-us[akka.io/contact-us,window="new"], provide the necessary details and submit the form. A team member will reach out to you shortly. diff --git a/docs/src/modules/support/pages/frequently-asked-questions.adoc b/docs/src/modules/support/pages/frequently-asked-questions.adoc index 616c8b06e..c8f4493e9 100644 --- a/docs/src/modules/support/pages/frequently-asked-questions.adoc +++ b/docs/src/modules/support/pages/frequently-asked-questions.adoc @@ -43,8 +43,8 @@ In one sentence: "High performance and very low latency in an extremely cost-eff In a few more words, with Akka, companies can: -- Provide higher agility to ever changing market demands: Legacy infrastructure and architectures make it very expensive to deliver scalable solutions quickly. Akka let's you circumvent all those technical limitations. -- Increase the speed to innovation: Distributed compute and data have long been purview of expert engineers proficient in narrow scope of programming languages. Akka makes building these kinds of applications straight-forward in languages you already know and use. +- Provide higher agility to ever-changing market demands: Legacy infrastructure and architectures make it very expensive to deliver scalable solutions quickly. Akka lets you circumvent all those technical limitations. +- Increase the speed to innovation: Distributed compute and data have long been purview of expert engineers proficient in narrow scope of programming languages. Akka makes building these kinds of applications straight-forward. - Lower infrastructure costs: Scalable cloud architectures are difficult to operate, require large teams of costly resources and run significant risk of unexpected budget overages. Akka will charge for what you use, not what you might need (when generally available). == What are the benefits for developers? @@ -63,10 +63,6 @@ Yes! Akka is a single globally distributed state model. Teams anywhere in the wo Akka leverages the proven Akka reactive architecture for building stateful, high-performance, business-critical systems, without the developer needing to understand the complexities of Akka itself or distributed systems architecture in general. -== What languages are supported? - -Akka supports Java and Scala. For a detailed overview of supported features see xref:reference:feature-matrix[Feature Matrix] section. - == What are the resource limits of an Akka service? Individual requests and responses, states and events can in general have a payload size up to 12 Mb. @@ -117,7 +113,7 @@ The short answer is no. Please see the documentation on xref:support:paid-plans. === How do I purchase a paid plan? -https://www.akka.io/contact[Contact Lightbend] to purchase a paid plan. See the https://www.akka.io/pricing[pricing page] for purchase options. +https://akka.io/contact-us[Contact Akka] to purchase a paid plan. See the https://akka.io/pricing[pricing page] for purchase options. == What if I have additional questions or want to provide feedback? diff --git a/docs/src/modules/support/pages/paid-plans.adoc b/docs/src/modules/support/pages/paid-plans.adoc index 341829ea2..7d5e7708e 100644 --- a/docs/src/modules/support/pages/paid-plans.adoc +++ b/docs/src/modules/support/pages/paid-plans.adoc @@ -15,7 +15,7 @@ Upgrading to a paid plan offer several benefits: == Upgrading to a paid plan -To upgrade, please https://www.akka.io/contact[contact Akka,window="new"]. +To upgrade, please https://akka.io/contact-us[contact Akka,window="new"]. You will be required to provide: @@ -27,4 +27,4 @@ You will be required to provide: == Billing models -Please see the https://www.akka.io/pricing[Akka Pricing] page for more details on billing models, features and pricing. +Please see the https://akka.io/pricing[Akka Pricing] page for more details on billing models, features and pricing. diff --git a/docs/src/modules/support/pages/request-a-demo.adoc b/docs/src/modules/support/pages/request-a-demo.adoc index c24e30bc4..350b248c4 100644 --- a/docs/src/modules/support/pages/request-a-demo.adoc +++ b/docs/src/modules/support/pages/request-a-demo.adoc @@ -6,4 +6,4 @@ include::ROOT:partial$include.adoc[] We'd love to learn about your requirements, answer your unique questions, and review ways that Akka can help you and your organization. -Browse to https://www.akka.io/contact[https://www.akka.io/contact,window="new"], provide the necessary details and submit the form. A team member will reach out to you shortly. \ No newline at end of file +Browse to https://akka.io/contact-us[akka.io/contact-us,window="new"], provide the necessary details and submit the form. A team member will reach out to you shortly. diff --git a/docs/src/modules/support/pages/troubleshooting.adoc b/docs/src/modules/support/pages/troubleshooting.adoc index 58ef9b9b0..504cf0276 100644 --- a/docs/src/modules/support/pages/troubleshooting.adoc +++ b/docs/src/modules/support/pages/troubleshooting.adoc @@ -22,7 +22,8 @@ NOTE: You can check the version of the Akka CLI you have by running `akka versio When you see the following error: -``` +[source] +---- [ERROR] /path/to/file.proto [0:0]: --akka-grpc_out: protoc-gen-akka-grpc: Plugin output is unparseable: [0.001s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /host/sys/fs/cgroup/cpuset. (...) [INFO] ------------------------------------------------------------------------ @@ -32,7 +33,7 @@ When you see the following error: [INFO] Finished at: 2022-03-07T15:31:49Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (protobuf) on project customer-registry: protoc did not exit cleanly. Review output for more information. -> [Help 1] -``` +---- This problem is caused by JDK17 https://bugs.openjdk.java.net/browse/JDK-8270087[reporting some warnings to `stdout` instead of `stderr`, window="new"]. The easiest way to resolve this is to avoid the situation leading to the warning, or switching to a JDK version without this bug, like JDK11. @@ -67,7 +68,7 @@ The same status message will appear within the System Lifecycle events window. *Options to resolve this issue include:* * Use a public repository -* Supply your xref:operations:projects/container-registries.adoc#_a_private_container_registry[credentials], and validate that they are correct. +* Supply your xref:operations:projects/external-container-registries.adoc[credentials], and validate that they are correct. == How to resolve errors when my deployment cannot start diff --git a/samples/choreography-saga-quickstart/pom.xml b/samples/choreography-saga-quickstart/pom.xml index c38bbd64f..ca3505f28 100644 --- a/samples/choreography-saga-quickstart/pom.xml +++ b/samples/choreography-saga-quickstart/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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/pom.xml b/samples/doc-snippets/pom.xml index 105bad2a4..4438557ea 100644 --- a/samples/doc-snippets/pom.xml +++ b/samples/doc-snippets/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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/pom.xml b/samples/endpoint-jwt/pom.xml index 4e0669b5c..918d8d332 100644 --- a/samples/endpoint-jwt/pom.xml +++ b/samples/endpoint-jwt/pom.xml @@ -4,7 +4,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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 203078fbf..9c92b0827 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/pom.xml b/samples/event-sourced-counter-brokers/pom.xml index e2812d254..407a16ed2 100644 --- a/samples/event-sourced-counter-brokers/pom.xml +++ b/samples/event-sourced-counter-brokers/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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 9feee3db1..a465e15a3 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/pom.xml b/samples/event-sourced-customer-registry-subscriber/pom.xml index 29b4816f7..87058782c 100644 --- a/samples/event-sourced-customer-registry-subscriber/pom.xml +++ b/samples/event-sourced-customer-registry-subscriber/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 customer 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/pom.xml b/samples/event-sourced-customer-registry/pom.xml index afa97411a..c8a3b2652 100644 --- a/samples/event-sourced-customer-registry/pom.xml +++ b/samples/event-sourced-customer-registry/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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/pom.xml b/samples/key-value-counter/pom.xml index efbe4d68e..3f4aa45a6 100644 --- a/samples/key-value-counter/pom.xml +++ b/samples/key-value-counter/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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/pom.xml b/samples/key-value-customer-registry/pom.xml index 29b017634..31dd00af8 100644 --- a/samples/key-value-customer-registry/pom.xml +++ b/samples/key-value-customer-registry/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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/pom.xml b/samples/key-value-shopping-cart/pom.xml index 4b0bbf34b..fe7ed18aa 100644 --- a/samples/key-value-shopping-cart/pom.xml +++ b/samples/key-value-shopping-cart/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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/pom.xml b/samples/reliable-timers/pom.xml index 1a7814988..602394187 100644 --- a/samples/reliable-timers/pom.xml +++ b/samples/reliable-timers/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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/pom.xml b/samples/shopping-cart-quickstart/pom.xml index 858d2e2fc..8f24b12b6 100644 --- a/samples/shopping-cart-quickstart/pom.xml +++ b/samples/shopping-cart-quickstart/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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/pom.xml b/samples/spring-dependency-injection/pom.xml index 76d7592e4..bcc0ada00 100644 --- a/samples/spring-dependency-injection/pom.xml +++ b/samples/spring-dependency-injection/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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/pom.xml b/samples/tracing/pom.xml index d175a602a..459e314f2 100644 --- a/samples/tracing/pom.xml +++ b/samples/tracing/pom.xml @@ -4,7 +4,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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/pom.xml b/samples/transfer-workflow-compensation/pom.xml index cd5c81dc5..66b1aecbc 100644 --- a/samples/transfer-workflow-compensation/pom.xml +++ b/samples/transfer-workflow-compensation/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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/pom.xml b/samples/transfer-workflow/pom.xml index 88bc52130..a34fd006f 100644 --- a/samples/transfer-workflow/pom.xml +++ b/samples/transfer-workflow/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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/pom.xml b/samples/view-store/pom.xml index f62cd033e..6b2204ab7 100644 --- a/samples/view-store/pom.xml +++ b/samples/view-store/pom.xml @@ -5,7 +5,7 @@ io.akka akka-javasdk-parent - 3.0.1 + 3.0.2 com.example 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