diff --git a/akka-docs/rst/java/lambda-actors.rst b/akka-docs/rst/java/lambda-actors.rst index db4cbc6251..ca451c71f9 100644 --- a/akka-docs/rst/java/lambda-actors.rst +++ b/akka-docs/rst/java/lambda-actors.rst @@ -833,6 +833,14 @@ those shutting down Akka Remoting (Artery). .. includecode:: code/docs/actorlambda/ActorDocTest.java#coordinated-shutdown-jvm-hook +For some tests it might be undesired to terminate the ``ActorSystem`` via ``CoordinatedShutdown``. +You can disable that by adding the following to the configuration of the ``ActorSystem`` that is +used in the test:: + + # Don't terminate ActorSystem via CoordinatedShutdown in tests + akka.coordinated-shutdown.terminate-actor-system = off + akka.coordinated-shutdown.run-by-jvm-shutdown-hook = off + akka.cluster.run-coordinated-shutdown-when-down = off .. _actor-hotswap-lambda: diff --git a/akka-docs/rst/project/migration-guide-2.4.x-2.5.x.rst b/akka-docs/rst/project/migration-guide-2.4.x-2.5.x.rst index 98516ff290..935e0c09ca 100644 --- a/akka-docs/rst/project/migration-guide-2.4.x-2.5.x.rst +++ b/akka-docs/rst/project/migration-guide-2.4.x-2.5.x.rst @@ -102,7 +102,16 @@ read the documentation for the Coordinated Shutdown and revisit your own impleme Most likely your implementation will not be needed any more or it can be simplified. More information can be found in the :ref:`documentation for Scala ` or -:ref:`documentation for Java ` +:ref:`documentation for Java ` + +For some tests it might be undesired to terminate the ``ActorSystem`` via ``CoordinatedShutdown``. +You can disable that by adding the following to the configuration of the ``ActorSystem`` that is +used in the test:: + + # Don't terminate ActorSystem via CoordinatedShutdown in tests + akka.coordinated-shutdown.terminate-actor-system = off + akka.coordinated-shutdown.run-by-jvm-shutdown-hook = off + akka.cluster.run-coordinated-shutdown-when-down = off Cluster Management Command Line Tool ------------------------------------ diff --git a/akka-docs/rst/scala/actors.rst b/akka-docs/rst/scala/actors.rst index 33bd4c404a..2c44eb2ba9 100644 --- a/akka-docs/rst/scala/actors.rst +++ b/akka-docs/rst/scala/actors.rst @@ -854,6 +854,14 @@ those shutting down Akka Remoting (Artery). .. includecode:: code/docs/actor/ActorDocSpec.scala#coordinated-shutdown-jvm-hook +For some tests it might be undesired to terminate the ``ActorSystem`` via ``CoordinatedShutdown``. +You can disable that by adding the following to the configuration of the ``ActorSystem`` that is +used in the test:: + + # Don't terminate ActorSystem via CoordinatedShutdown in tests + akka.coordinated-shutdown.terminate-actor-system = off + akka.coordinated-shutdown.run-by-jvm-shutdown-hook = off + akka.cluster.run-coordinated-shutdown-when-down = off .. _Actor.HotSwap: diff --git a/akka-samples/akka-sample-cluster-java/src/test/resources/reference.conf b/akka-samples/akka-sample-cluster-java/src/test/resources/reference.conf new file mode 100644 index 0000000000..90492329b7 --- /dev/null +++ b/akka-samples/akka-sample-cluster-java/src/test/resources/reference.conf @@ -0,0 +1,4 @@ +# Don't terminate ActorSystem in tests +akka.coordinated-shutdown.run-by-jvm-shutdown-hook = off +akka.coordinated-shutdown.terminate-actor-system = off +akka.cluster.run-coordinated-shutdown-when-down = off diff --git a/akka-samples/akka-sample-cluster-scala/src/test/resources/reference.conf b/akka-samples/akka-sample-cluster-scala/src/test/resources/reference.conf new file mode 100644 index 0000000000..90492329b7 --- /dev/null +++ b/akka-samples/akka-sample-cluster-scala/src/test/resources/reference.conf @@ -0,0 +1,4 @@ +# Don't terminate ActorSystem in tests +akka.coordinated-shutdown.run-by-jvm-shutdown-hook = off +akka.coordinated-shutdown.terminate-actor-system = off +akka.cluster.run-coordinated-shutdown-when-down = off diff --git a/akka-samples/akka-sample-distributed-data-java/src/test/resources/reference.conf b/akka-samples/akka-sample-distributed-data-java/src/test/resources/reference.conf new file mode 100644 index 0000000000..90492329b7 --- /dev/null +++ b/akka-samples/akka-sample-distributed-data-java/src/test/resources/reference.conf @@ -0,0 +1,4 @@ +# Don't terminate ActorSystem in tests +akka.coordinated-shutdown.run-by-jvm-shutdown-hook = off +akka.coordinated-shutdown.terminate-actor-system = off +akka.cluster.run-coordinated-shutdown-when-down = off diff --git a/akka-samples/akka-sample-distributed-data-scala/src/test/resources/reference.conf b/akka-samples/akka-sample-distributed-data-scala/src/test/resources/reference.conf new file mode 100644 index 0000000000..90492329b7 --- /dev/null +++ b/akka-samples/akka-sample-distributed-data-scala/src/test/resources/reference.conf @@ -0,0 +1,4 @@ +# Don't terminate ActorSystem in tests +akka.coordinated-shutdown.run-by-jvm-shutdown-hook = off +akka.coordinated-shutdown.terminate-actor-system = off +akka.cluster.run-coordinated-shutdown-when-down = off diff --git a/akka-samples/akka-sample-multi-node-scala/src/test/resources/reference.conf b/akka-samples/akka-sample-multi-node-scala/src/test/resources/reference.conf new file mode 100644 index 0000000000..90492329b7 --- /dev/null +++ b/akka-samples/akka-sample-multi-node-scala/src/test/resources/reference.conf @@ -0,0 +1,4 @@ +# Don't terminate ActorSystem in tests +akka.coordinated-shutdown.run-by-jvm-shutdown-hook = off +akka.coordinated-shutdown.terminate-actor-system = off +akka.cluster.run-coordinated-shutdown-when-down = off diff --git a/akka-samples/akka-sample-remote-java/src/test/resources/reference.conf b/akka-samples/akka-sample-remote-java/src/test/resources/reference.conf new file mode 100644 index 0000000000..90492329b7 --- /dev/null +++ b/akka-samples/akka-sample-remote-java/src/test/resources/reference.conf @@ -0,0 +1,4 @@ +# Don't terminate ActorSystem in tests +akka.coordinated-shutdown.run-by-jvm-shutdown-hook = off +akka.coordinated-shutdown.terminate-actor-system = off +akka.cluster.run-coordinated-shutdown-when-down = off diff --git a/akka-samples/akka-sample-remote-scala/src/test/resources/reference.conf b/akka-samples/akka-sample-remote-scala/src/test/resources/reference.conf new file mode 100644 index 0000000000..90492329b7 --- /dev/null +++ b/akka-samples/akka-sample-remote-scala/src/test/resources/reference.conf @@ -0,0 +1,4 @@ +# Don't terminate ActorSystem in tests +akka.coordinated-shutdown.run-by-jvm-shutdown-hook = off +akka.coordinated-shutdown.terminate-actor-system = off +akka.cluster.run-coordinated-shutdown-when-down = off