Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace usage of KubernetesServerTestResource with WithKubernetesTestServer annotation #452

Closed
wants to merge 2 commits into from

Conversation

kornys
Copy link
Contributor

@kornys kornys commented Jul 22, 2021

No description provided.

@kornys
Copy link
Contributor Author

kornys commented Jul 22, 2021

@shawkins for some reason when I replaced QuakusTestResoruce with WithKubernetesTestServer annotation, unit tests triggered by maven surefire failed after some time with OOM

@shawkins
Copy link
Contributor

@kornys looks like we'll need to reach out to the quarkus team. That doesn't look like an error on our part. An incremental change to try would be to use:

@QuarkusTestResource(value=KubernetesServerTestResource.class, restrictToAnnotatedClass = true)

and see if it produces the same error.

@kornys
Copy link
Contributor Author

kornys commented Jul 23, 2021

@kornys looks like we'll need to reach out to the quarkus team. That doesn't look like an error on our part. An incremental change to try would be to use:

@QuarkusTestResource(value=KubernetesServerTestResource.class, restrictToAnnotatedClass = true)

and see if it produces the same error.

ok I will try it

@kornys
Copy link
Contributor Author

kornys commented Jul 23, 2021

@shawkins I have just tried suggested annotation with same results (OOM)

@shawkins
Copy link
Contributor

@kornys a quarkus issue is definitely needed.

@kornys
Copy link
Contributor Author

kornys commented Jul 23, 2021

ok I will open issue in quarkus

@ppatierno
Copy link
Contributor

@kornys pretty sure you were going to do so but just as reminder please link the Quarkus issue to this one ;-)

@metacosm
Copy link
Contributor

I'm trying to reproduce the issue locally but looking at the stack trace, I suspect an infinite loop in the CRD generation process… I might be wrong, though, hopefully I should know more soon.

@kornys kornys force-pushed the use-with-kube-server branch from dec33cb to 1c64089 Compare August 10, 2021 08:00
@github-actions github-actions bot added operator changes related to operator sync changes related to sync test Test related changes labels Aug 10, 2021
@shawkins
Copy link
Contributor

@kornys @ppatierno still has problems after the 2.2.2 upgrade.

@shawkins
Copy link
Contributor

@kornys was there already a quarkus issue captured for this?

@shawkins
Copy link
Contributor

Captured upstream as quarkusio/quarkus#18973

@shawkins
Copy link
Contributor

It looking at alternatives, there's not a simple way for us to supply a different KubernetesClient. If you try creating a Mock bean, a Provider in the test src, etc. Quarkus will still initially attempt to use test support that is baked into the quarkus kubernetes extension - which will occur before normal beans are inited. This appears to be a problem even if we tried to inject something other KubernetesClient that provided a client - the extension/platform support would still initially be used and cause a failure. I think we need to push to get the root issue resolved.

@metacosm this OOM does appear related to the operator SDK. If I change just the sync module to using the new annotation, it works fine. Some oddities about what is happening - it requires more than 1 class with restrictToAnnotatedClass = true, but then the actually OOM can occur in any other test. For example if I change both ManagedKafka* tests then do a "mvn clean install -Dtest=ManagedKafka*" - it's fine. If I do "mvn clean install" - it fails. If I run the test whole test suite through the IDE, it's fine. I'll poke around a bit more with some debugging to see if anything jumps out.

@kornys kornys closed this Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE operator changes related to operator sync changes related to sync test Test related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace usage of KubernetesServerTestResource with WithKubernetesTestServer annotation
4 participants