I'm trying to run tests in quarkus:dev mode with some kafka tests.
The problem is that the quarkus:dev mode test runner can't start the redpanda kafka container. Is that a know problem or is that currently not possible to do?
#kai what logs can you post on the redpanda side? you can try to pin the image to say vectorized.io/redpanda:v21.8.1 or smth like that in case you had a cached old image.
Make sure quarkus.kafka.devservices.enabled property is set to true.
Related
My app uses mongodb and I have bunch tests that save/query and update data.
I run my tests without a mongodb instance and they all pass! why?
Is this a known feature? what is it called?
Can someone please point me to the bit of documentation that confirms this?
It seems like Spring Boot will use an Embedded (in memory) version of Mongo. I'm not sure if this is enabled by default, or if you need to add an extra dependency.
See this page: https://www.baeldung.com/spring-boot-embedded-mongodb
I am porting my old Eclipse Restful project into Spring Boot 2. So far I am happy that my project is ready to deploy in production, BUT...
When I do "mvn clean install" the process fails since it tries to validate an internal IP address for my production DB server.
Current Condition: I work from home and, I don't need to test the connectivity on my computer, since I have no access to internal network, So I need to do a RDP to deploy the project.
Question: In Eclipse you can deploy any project without forcing to test the connection pool , can I do the same with Spring Boot 2? Can I bypass this initialization from Hiraki?
Thanks in advance for any info.
mvn install by default will run your test cases, and as part of that it will bring up your Spring Boot app to run those tests. Even if we disable the Hikari connect tests, without a proper database connection many other things will likely subsequently fail.
Is there a dev db server at work you can test against? (Or can you set up your tests to run against an in-memory db like HSQLDB?)
If you're very confident that you don't need to re-run the tests, you can disable them during install with:
mvn install -DskipTests
I have a multi-modules vertx application deployed on OpenShift. For integration testing purposes, I would like to deploy a database container with pre-defined data, and destroy it when the test is finished.
How can I achieve this ?
My application uses junit and maven fabric8 plugin to deploy containers in Openshift.
This is something that could be done relatively easy using arquillian-cube, which does support Kubernetes and Openshift.
What arquillian-cube can do for you, is to (optionally) create an ephemeral project, deploy everything you need for your test and once everything is up and running, then start your tests. In the end it can also do the cleaning up for you.
It is quite flexible so according to your needs and requirements it can work with either ephemeral or fixed projects. And also there are pletny of configuration options when it comes to cleaning up.
Last but not least, it does play quite nicely with the fabric8 maven plugin.
https://github.com/arquillian/arquillian-cube/blob/master/docs/kubernetes.adoc
I would like to stop Tomcat when a war deployment fails. Is there some hook or listener which could be used for that?
I know, normally one would not make the container stop when a deployment fails. In my case I would like to implement a Fail-fast error model with Tomcat since there is currently no chance to replace the WAR with a fat jar with an embedded Servlet engine (e.g., Spring-Boot).
In the mean time I have implemented a Tomcat LifecycleListener which shuts down TC when a deployment fails: https://github.com/ascheman/tomcat-lifecyclelistener
Thanks to Thomas Meyer who gave some hints on Twitter: https://twitter.com/thomasmey/status/752971635825729537.
Spring boot provides shutdown hook. SOF has similar query as below
Spring Boot shutdown hook
This can give and idea to implement your app Fail Fast behavior with hook.
I have a Spring project (Apache CXF, Spring, Hibernate, Maven ...) hosted on BitBucket and I'm trying to use Bamboo as my CI server. My idea is deploying the code directly to Heroku from Bamboo so that deploying time is automated.
I made a plan with a couple of tasks to achieve this. First I have a Source Code Checkout task and a builder task. Both of them are working, code is compiling and test are passing, I can see that in the task log. The problem is that Bamboo doesn't seem to recognize the tests (it marks the task are testless).
I have also tried to create a new JUnit test task and it's even worst. Log shows that everything is working properly but Bamboo marks the plan as a failure after the test task is executed.
Any ideas?
Not sure which version of Bamboo you're using, but in the version that we have, you have to turn on unit test result evaluation on the Builder tab. Please see the attached screenshot, and make sure that this is enabled, and the directory setting is pointing to the directory where Maven Surefire creates the test results (in XML format).