jakartaee / cdi-tck

CDI TCK
Apache License 2.0
46 stars 44 forks source link

Inspect tests disabled directly in code and change them as needed #446

Closed manovotn closed 11 months ago

manovotn commented 1 year ago

The issue was brought up via email, see this thread.

IIRC, according to TCK doc, all intentionally disabled tests should be mentioned in tck-tests.xml. However, we currently have two tests that are disabled directly in code and not mentioned in the XML, those are:

We need to take a look at them and determine how to treat them (i.e. if they still need to be disabled and is so then do that via XML file).

manovotn commented 1 year ago

https://github.com/jakartaee/cdi-tck/blob/master/web/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/BeanTypesWithIllegalTypeTest.java#L62

Legacy JIRA link - https://issues.redhat.com/browse/CDITCK-575

The assertion linked to this test is marked as not testable and due to the limitation on the type of resource in web.xml the original format of this test was invalid. I don't believe we can test this - the set of valid values for resource is limited and it seems that its types are all legal bean types. We could probably just delete this test and associated unused classes.

https://github.com/jakartaee/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/full/definition/bean/custom/CustomBeanImplementationTest.java#L143

Legacy JIRA link - https://issues.redhat.com/browse/CDITCK-579

The assumption made by this test seems correct but there is no guarantee about when that happens. However, if we make sure the test actually creates an instance of the bean (so that injection into contextual reference triggers), it should be safe to assert it. This is something we should check up on with OWB impl which originally filed the TCK JIRA.

I'll send a PR with suggested changes shortly.