This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new 78aaf9d Fixup e72113e send optaplanner test messages asynchronously
78aaf9d is described below
commit 78aaf9dddf2d653a4a89da16c43ef355c1823fe1
Author: James Netherton <[email protected]>
AuthorDate: Mon Feb 14 08:13:13 2022 +0000
Fixup e72113e send optaplanner test messages asynchronously
---
.../camel/quarkus/component/optaplanner/it/OptaplannerResource.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerResource.java
b/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerResource.java
index 3fe3c8a..4cef2f1 100644
---
a/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerResource.java
+++
b/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerResource.java
@@ -63,7 +63,9 @@ public class OptaplannerResource {
@Path("solveSync")
public void solveSync() {
if (SolverStatus.NOT_SOLVING ==
solverManager.getSolverStatus(SINGLETON_TIME_TABLE_ID)) {
- producerTemplate.sendBodyAndHeader("direct:solveSync",
DataGenerator.timeTable, OptaPlannerConstants.SOLVER_MANAGER,
+ // The message payload is sent asynchronously, but the optaplanner
route is configured to solve the problem synchronously
+ producerTemplate.asyncRequestBodyAndHeader("direct:solveSync",
DataGenerator.timeTable,
+ OptaPlannerConstants.SOLVER_MANAGER,
solverManager);
}
}
@@ -72,7 +74,7 @@ public class OptaplannerResource {
@Path("solveAsync")
public void solveAsync() throws ExecutionException, InterruptedException {
if (SolverStatus.NOT_SOLVING ==
solverManager.getSolverStatus(SINGLETON_TIME_TABLE_ID)) {
- producerTemplate.sendBodyAndHeader("direct:solveAsync",
DataGenerator.timeTable,
+ producerTemplate.asyncRequestBodyAndHeader("direct:solveAsync",
DataGenerator.timeTable,
OptaPlannerConstants.SOLVER_MANAGER, solverManager);
}
}