-
Notifications
You must be signed in to change notification settings - Fork 44
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
DependentContextTest#testDependentScopedInterceptorsAreDependentObjectsOfBean() does not test the spec assertion #454
Comments
Could you test this indirectly by injecting a |
That is a good idea! I'll see if I can rewrite the test like that. |
Very good idea indeed, that should do the trick! |
Added the |
As discussed in the meeting today, the solution to this challenge needs to be a test exclusion. I'll send a PR for this. |
@Ladicek @Emily-Jiang it seems that I was mistaken and that we got a little confused in the mtg discussion yesterday :) |
The
org.jboss.cdi.tck.tests.context.dependent.DependentContextTest#testDependentScopedInterceptorsAreDependentObjectsOfBean()
test method does not test the linked spec assertion:It merely asserts that if
CreationalContext#release()
is called then theTransactionalInterceptor#destroy()
callback is invoked because theAccountTransaction
bean is destroyed. And even this assert is questionable because the test should rather callBean#destroy()
instead;CreationalContext#release()
should destroy the dependent objects and not the bean itself.In fact, this assertion should be
testable=false
because there's no reasonable way to test it (an interceptor may not declare its own@PreDestroy
callback).I'd recommend to mark the assertion as
testable=false
and remove the test method completely.The text was updated successfully, but these errors were encountered: