Open StFS opened 7 months ago
I guess this is because we build only one Command Router image for running the ITs and add the selected cache configuration to the image. When you initially ran the tests with the remote cache, the hono-service-command-router-test
image is built and the config from the remote-cache
folder is added. When you then run the tests with the embedded cache, Maven thinks that the image is already there and does not need to be rebuilt. You might be able to solve this by including the cache profile name into the image name (https://github.com/eclipse-hono/hono/blob/09af700c68a310d56254e98d9805d05c85e49684/tests/pom.xml#L1500)
After building Hono and containers, I go to the
tests/
directory and run the integration tests there. If I first run theremote_cache
(default) profile, the tests pass fine. But if I then run theembedded_cache
profile (without runningmvn clean
in between), thecommand-router
is unable to start as it tries to connect to theinfinispan
remote cache with invalid configuration.Here are the commands that I used with a summary of the results:
The workaround for this is to run
mvn clean
in between runs (which can also be achieved by adding theclean
target to the second Maven command in the above block, that ismvn clean verify -Prun-tests,coap-only,embedded_cache
)