Details
-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
Description
Intro: Command Gateway (cmdgw) [1] is the Hawkular component taking care for routing messages from among various Websocket clients via JMS.
The typical flow is:
(1) A browser UI client sends a command via websocket to cmdgw on host1
(2) cmdgw on host1 receives the command an forwards it to a JMS queue or topic
(3) cmdgw on host2 (host1 and host2 belong to the same JMS cluster) receives the JMS message and forwards it to a Hawkular agent instance connected via Websocket
(4) Hawkular agent instance performs the command and sends a response through the same route back to the browser UI client.
At the moment, we test flows like the above as a part of Agent build [2], which is good, but we do not have any test inside the cmdgw component. The present objective is:
i. Create a new `hawkular-command-gateway-itest` maven module under `hawkular-command-gateway-parent`
ii. `hawkular-command-gateway-itest` will look similar to `hawkular-wildfly-agent-itest` [3] but it will have to depend on `hawkular-accounts-feature-pack` much like `hawkular-inventory-itest-dist` [4].
iii. For the beginning copy only the `EchoCommandITest` [5] from Agent. This task will be considered completed if the `EchoCommandITest` will run and pass as a part of the Maven build.
[1] https://github.com/hawkular/hawkular-command-gateway
[2] https://github.com/hawkular/hawkular-agent/tree/master/hawkular-wildfly-agent-itest-parent/hawkular-wildfly-agent-itest/src/test/java/org/hawkular/cmdgw/ws/test
[3] https://github.com/hawkular/hawkular-agent/tree/master/hawkular-wildfly-agent-itest-parent/hawkular-wildfly-agent-itest
[4] https://github.com/hawkular/hawkular-inventory/blob/master/hawkular-inventory-itest-parent/hawkular-inventory-itest-dist/server-provisioning.xml#L22 and https://github.com/hawkular/hawkular-inventory/blob/master/hawkular-inventory-itest-parent/hawkular-inventory-itest-dist/pom.xml#L59-L84
[5] https://github.com/hawkular/hawkular-agent/blob/master/hawkular-wildfly-agent-itest-parent/hawkular-wildfly-agent-itest/src/test/java/org/hawkular/cmdgw/ws/test/EchoCommandITest.java