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

Significant execution time degradation with agent used during tests #10352

Open
kgonia opened this issue Dec 19, 2024 · 0 comments
Open

Significant execution time degradation with agent used during tests #10352

kgonia opened this issue Dec 19, 2024 · 0 comments
Assignees
Labels

Comments

@kgonia
Copy link

kgonia commented Dec 19, 2024

Describe the issue
When running Spring tests with the GraalVM agent, there is significant execution time degradation compared to running without the agent. With the agent enabled, test execution takes over 1 hour versus 4 minutes without it for a project with ~120 MockMvc integration tests.

Originally I described issue in gradle native plugin graalvm/native-build-tools#655 but was suggested to move it here.

Steps to reproduce the issue

  1. The issue can be partially demonstrated with spring-petclinic, though with smaller impact:
    • Without agent: ~1m 28s
    • With standard agent: ~2m 16s
    • With conditional agent: ~3m 43s

However, my case shows much more severe degradation. I should note that a few beans were mocked using @MockBean (switching to @MockitoBean didn't change much), which might lead to context refresh. Even considering this behavior, I'm wondering why it would slow execution so dramatically. Additionally, pet-clinic also uses @MockitoBean but doesn't show comparable degradation.

Environment:
OS: Windows
GraalVM Version: GraalVM 22.3.1 Java 19 C
Java Version: 19.0.2+7-jvmci-22.3-b12

OS: WSL
GraalVM Version: CE 23.0.1+11.1
Java Version: 23.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants