Closed
Description
Clockrun Ren opened BATCH-2314 and commented
By using JobScopeTestExecutionListener in my test case (base on testng), I was able to instantiate job scope bean. however, after test method is executed, destroy() in job scope bean is never called.
After some investigation, I find there are issues in class JobScopeTestExecutionListener.
In method afterTestMethod, it will do JobSynchronizationManager.close(). which only remove scoped bean from context, without invoke of destroy(). if we use JobSynchronizationManager.release(), then everything is fine.
Affects: 3.0.1