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

Testcontainer runs out of memory #672

Open
jonathanlukas opened this issue Feb 23, 2023 · 3 comments
Open

Testcontainer runs out of memory #672

jonathanlukas opened this issue Feb 23, 2023 · 3 comments
Labels
area/ux Relates to user experience kind/feature Categorizes an issue or PR as a feature, i.e. new behavior

Comments

@jonathanlukas
Copy link
Contributor

Description

When running unit tests, the testcontainer extension runs out of memory from time to time when being executed inside a github action.

Here is an example on a failed run: https://github.com/camunda-community-hub/camunda-7-to-8-migration/actions/runs/4252564209/jobs/7396314679

Under Check Test Fails, you can find the logs of the tests.

Is there an option to increase the memory allocated to the container to prevent this?

Alternative: We split up the test in multiple classes, however this is a dynamic test which is generated from a java object.

@jonathanlukas jonathanlukas added the kind/feature Categorizes an issue or PR as a feature, i.e. new behavior label Feb 23, 2023
@korthout
Copy link
Member

korthout commented Mar 1, 2023

We would need to investigate why this happens and what possible solutions exist. This may take considerable effort.

@jonathanlukas Could you share more details on the cases where this happens? This may help us to better understand the underlying cause.

Note, that there are two workarounds available:

  • split up your test class into multiple classes
  • don't use the testcontainer extension, but switch to the standard

At this time, we prioritize this issue as later

@jonathanlukas
Copy link
Contributor Author

jonathanlukas commented Mar 1, 2023

In fact, the case where this happens was eliminated as we needed to progress.

However, I can describe how I did eliminate it.

In fact, splitting the test to multiple classes made it even worse - do not ask me why, but the test was slow and got stuck even local.

The only resolution for me was to disable the @SpringZeebeTest and use @ZeebeProcessTest instead. This made the workers not poll the engine and I had to create the beans by hand.

The clue that led me to this solution was that the printed event stream on a failed/timed out test did show like 80% activateJob commands which (possibly?) pollutes the event stream and puts load on the engine without having anything happen.

Maybe this could be a starting point to improve reliability of the testcontainer.

PS: I also thought about moving the embedded test setup, however our project needs to rely on Java 1.8 as there are artifacts produced that should be included as dependency to other project. Our experience shows that LTS is taken VERY serious by the Java community.

@korthout korthout added the area/ux Relates to user experience label Mar 1, 2023
@saig0
Copy link
Member

saig0 commented May 31, 2024

Note

Heads up! We are building a new Java testing library for Camunda 8.6. The new library will replace Zeebe Process Test.
Read more about upcoming changes here and stay tuned for updates. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ux Relates to user experience kind/feature Categorizes an issue or PR as a feature, i.e. new behavior
Projects
None yet
Development

No branches or pull requests

3 participants