Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-12217 Apply the new features of Junit 5.8 to code base
  3. KAFKA-12187

replace assertTrue(obj instanceof X) by assertInstanceOf when we update to JUnit 5.8

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.8.0
    • None
    • None

    Description

      see https://github.com/apache/kafka/pull/9874#discussion_r556547909

       

      Yeah, for existing code improvements (versus code introduced by this change), let's do it via a different PR. For this particular issue, we can probably wait for JUnit 5.8 and use:

      • New assertInstanceOf methods as a replacement for assertTrue(obj instanceof X) which provide better error messages comparable to those of assertThrows.

       related PR: https://github.com/junit-team/junit5/pull/2499

      Attachments

        Issue Links

          Activity

            People

              brandboat Kuan Po Tseng
              chia7712 Chia-Ping Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: