Skip to content

Create a test that asserts implementations can provide the backward compatible switch for empty beans.xml change #428

Open
@manovotn

Description

@manovotn

With CDI 4, the empty beans.xml now defaults to annotated and we have tests covering that.
The spec also states:

For compatibility with CDI versions prior to 4.0, CDI Full products must contain an option that causes an archive with empty beans.xml to be considered an explicit bean archive.

This isn't tested because this option is impl-specific and so we cannot assert that out of the box.
However, we might be able to introduce a TCK SPI that will have to be implemented by whoever runs the TCK and then a test that uses this SPI to switch to this behavior and then perform some assertions
What we could do is introduce a TCK SPI that needs to be implemented and that allows to switch to this behavior and then perform assertions.

Note that TCK already has some such SPIs, the Contexts one being an example.

This idea was mentioned in jakartaee/cdi#659 and also discussed in CDI mtg (Feb 14, 2023)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions