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

Custom CreationalContext used by TCK is not required to be supported #453

Closed
manovotn opened this issue Apr 26, 2023 · 1 comment · Fixed by #463
Closed

Custom CreationalContext used by TCK is not required to be supported #453

manovotn opened this issue Apr 26, 2023 · 1 comment · Fixed by #463
Labels
accepted Issue/challenge is accepted challenge TCK test challenge

Comments

@manovotn
Copy link
Contributor

manovotn commented Apr 26, 2023

On several places, TCK tests use a custom CreationalContext implementation - org.jboss.cdi.tck.util.MockCreationalContext.

However, the specification doesn't state that arbitrary custom creational contexts should be supported in general nor is any test asserting that claim.
Plus it's not realistic either as the API is very minimal and both impls I am familiar with need a much richer internal API to handle CC and, in turn, expect that any CC they operate on is an instance of their internal implementation.

Now, this custom CC is used in two ways:

  1. In tests where there is need to create any instance of CC
    1.1 An example can be seen here
    1.2 These can be easily replaced by BeanManager#createCreationalContext() without changing what the test does - as such these can be altered even for 4.x releases without need for exclusion
  2. In tests that need to verify what's happening in the CC; basically an introspection of how the CC should work
    2.1 An example is this test
    2.2 We can replace these test with new TCK SPI which introduces and inspectable CC provided by the impl and therefore still being based on their internal impl. This doesn't change the nature of what is tested, it merely let's the integrator provide an instance of CC which the TCK can inspect and verify.

@Ladicek already created a proposal for the TCK SPI that could be used in future version of TCKs (minor/major update); see #452

For current version of TCKs linked to CDI 4.0, I'd suggest we exclude any tests that rely on introspection of the CC. WDYT?

@manovotn manovotn added the challenge TCK test challenge label Apr 26, 2023
@Ladicek
Copy link
Contributor

Ladicek commented Apr 26, 2023

I obviously agree :-)

@Ladicek Ladicek added the accepted Issue/challenge is accepted label May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Issue/challenge is accepted challenge TCK test challenge
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants