Skip to content

Closing org.springframework.web.context.support.GenericWebApplicationContext issue during running Test class #41254

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

Closed
lovinjv opened this issue Jun 27, 2024 · 6 comments
Labels
status: invalid An issue that we don't feel is valid

Comments

@lovinjv
Copy link

lovinjv commented Jun 27, 2024

I have recently migrated a springboot v2.7.5 application which uses spring batch to spring boot v3 with jdk 17 . I have a test class which uses @SpringBootTest and one of the test method executes a flow of running a job , running tasklet and running Listener. I am using 2 data sources(h2) . While the tasklet is executed , I get a warning "Closing org.springframework.web.context.support.GenericWebApplicationContext" and Hikari pools starts shutting down resulting in below exception:
"Closing connection (connection evicted)"
When i run the same tests in older version v2.7.5 , the GenericWebApplicationContext is closed after full flow is executed .

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 27, 2024
@wilkinsona
Copy link
Member

Thanks for the report. Unfortunately, it doesn't contain enough information for us to be able to help you. From what you've described thus far, it sounds like the change in behavior is likely to be due to a change in Spring Batch but that's just a guess at this point. If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Jun 27, 2024
@lovinjv
Copy link
Author

lovinjv commented Jun 27, 2024

@wilkinsona Sharing a poc to reproduce may take some time but meanwhile can you suggest if we can use @SpringBatchTest for writing unit test if we have more that one Job. I had referred to spring-projects/spring-batch#3699

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Jun 27, 2024
@philwebb
Copy link
Member

@lovinjv We don't really have the necessary experience with Spring Batch to be able to offer any deep advice with their codebase. Please ask on stackoverflow.com.

@philwebb philwebb added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Jun 27, 2024
@spring-projects-issues
Copy link
Collaborator

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Jul 4, 2024
@lovinjv
Copy link
Author

lovinjv commented Jul 4, 2024

you can close the issue . I was able to find a solution.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue labels Jul 4, 2024
@wilkinsona
Copy link
Member

Thanks for letting us know, @lovinjv.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2024
@wilkinsona wilkinsona added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

4 participants