diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/operator/TheodoliteOperator.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/operator/TheodoliteOperator.kt index 0415680f5947b3a7d759ad0dbf67cd27c2c58d24..5318abc174d9204c19466729698a63f2ad29a54c 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/operator/TheodoliteOperator.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/operator/TheodoliteOperator.kt @@ -67,15 +67,16 @@ class TheodoliteOperator { client = client ).clearClusterState() - getController( + controller = getController( client = client, executionStateHandler = getExecutionStateHandler(client = client) - ).run() - getExecutionEventHandler(client).startAllRegisteredInformers() + ) + getExecutionEventHandler(controller, client).startAllRegisteredInformers() + controller.run() } } - fun getExecutionEventHandler(client: NamespacedKubernetesClient): SharedInformerFactory { + fun getExecutionEventHandler(controller: TheodoliteController, client: NamespacedKubernetesClient): SharedInformerFactory { val factory = client.informers() .inNamespace(client.namespace) diff --git a/theodolite-quarkus/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt b/theodolite-quarkus/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt index d72dd1cd3e70d94dbd49efb866b8ae6334ab0a4c..bbbb3092cd54a8f3313bb923be3682be50801f39 100644 --- a/theodolite-quarkus/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt +++ b/theodolite-quarkus/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt @@ -39,7 +39,7 @@ class ExecutionEventHandlerTest { executionStateHandler = ExecutionStateHandler(client = server.client) ) - this.factory = operator.getExecutionEventHandler(server.client) + this.factory = operator.getExecutionEventHandler(this.controller,server.client) this.stateHandler = TheodoliteOperator().getExecutionStateHandler(client = server.client) this.executionVersion1 = K8sResourceLoader(server.client)