Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-15079

MicroProfileConfigConvertersTestCase uses Converter<String> that converts also Resteasy values

    XMLWordPrintable

Details

    Description

      The MicroProfileConfigConvertersTestCase in testsuite/integration/microprofile cannot run standalone (-Dtest=MicroProfileConfigConvertersTestCase) because it uses HighPriorityStringConverter1 that implements Converter<String> which will convert all String config injections which are now also used in RESTEasy (for instance [here|https://github.com/resteasy/Resteasy/blob/3.15/resteasy-jaxrs/src/main/java/org/jboss/resteasy/plugins/server/servlet/ConfigurationBootstrap.java#L272). The use of Converter<String>, in general, is wrong because we don't want to change all String injections. Converters are intended for user custom types.

      Note that the test passes if some other test that will let RESTEasy initialize correctly is run before it (for instance MicroProfileConfigTestCase) and this is why we didn't notice this problem before. However, AdoptOpenJDK-11.0.11+9 runs the tests in a different order and runs MicroProfileConfigConvertersTestCase first so anyone running AdoptOpenJDK essentially cannot run the test suite.

      Attachments

        Issue Links

          Activity

            People

              mstefank Martin Stefanko
              mstefank Martin Stefanko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: