Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-17160

Always import `mockito-inline` if the mockito version is 4.x

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.9.0
    • None
    • None

    Description

      Currently, we pick up mockito artifact according to java version[0]. It can cause mock error on final class when we run JDK 11+ with scala 2.12, since it imports the 4.x mockito-core which does not include features of mockito-line.

      In short, the artifact should be based on mockito version rather than java version. Otherwise, some tests (for example, `PCollectionsImmutableSetTest`) never pass

      [0] https://github.com/apache/kafka/blob/trunk/gradle/dependencies.gradle#L74

      Attachments

        Issue Links

          Activity

            People

              mingyen066 Ming-Yen Chung
              chia7712 Chia-Ping Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: