Open andraspatka opened 3 years ago
Hello,
Thanks for reporting this detailed issue 👍 . I will look into it next week.
I'm indeed aware of the issue of pods and services remaining in case of tests process execution interruption but not yet have a viable solution for it, something to come in the upcoming version for sure.
Thanks and regards, Jean-Baptiste
The https://github.com/JeanBaptisteWATENBERG/junit5-kubernetes/issues/6 issue addressed this already, and the fix seemed to solve the maven problem, but unfortunately the problem still persists and the services remain there. The Pod is started as expected:
But when trying to connect to it, an error is raised:
When running
kubectl get svc -n <project-namespace>
the output is the following:After running
kubectl delete --all svc --namespace=<project-namespace>
, the tests will run as expected.Could you please take a look at it? It seems like the services still stick around, despite the pods being deleted. A known problem is, when stopping the
mvn test
command with ctrl + c, then the pods don't get deleted and obviously the service will also stick around.However, I investigated it and saw that the NodePort still sticks around for a pod which gets stopped after test execution.
mvn version: 3.8.2 k8s version: v1.19.7 Docker-desktop K8s is used. Docker-desktop version: 3.5.2 junit5-kubernetes version: 2.3.1-beta