jakartaee / cdi-tck

CDI TCK
Apache License 2.0
46 stars 45 forks source link

Create TCK coverage for BeanManager.getContexts() #396

Closed manovotn closed 9 months ago

manovotn commented 1 year ago

Related specification issue - https://github.com/jakartaee/cdi/issues/628

Tracking issue for TCK tests for this feature. Note that the feature is scheduled for next CDI version (beyond 4.0). The test should probably use a custom scope with custom context as all impls can (in theory) have multiple contexts per given built-in scope making assertions on that unreliable.

Ladicek commented 1 year ago

Also we probably should have 2 variants of the same test -- one for context registered through BCExtension, and another one for context registered through PExtension.

manovotn commented 1 year ago

I think the BCE variant would be enough.

With PE, you don't even need the method to begin with. Plus BM needs to have references to all instances of contexts anyway since you can already browse them when active. Therefore, so long as registration works (for which there should be different test already), you will see it there.