Replace use of PowerMock with Mockito (#12282)
authorXavier Léauté <xvrl@apache.org>
Mon, 28 Feb 2022 06:47:09 +0000 (22:47 -0800)
committerGitHub <noreply@github.com>
Mon, 28 Feb 2022 06:47:09 +0000 (22:47 -0800)
commitd105519558951aa289992d05043194b8b7ceaee4
treeef20f03caca87a9b9a0e1f79b46357c8590dfec5
parent1434197ee179955987462c5c7f4030ca0bc43edb
Replace use of PowerMock with Mockito (#12282)

Mockito now supports all our needs and plays much better with recent Java versions.
Migrating to Mockito also simplifies running the kind of tests that required PowerMock in the past.

* replace all uses of powermock with mockito-inline
* upgrade mockito to 4.3.1 and fix use of deprecated methods
* import mockito bom to align all our mockito dependencies
* add powermock to forbidden-apis to avoid accidentally reintroducing it in the future
16 files changed:
codestyle/druid-forbidden-apis.txt
core/pom.xml
extensions-core/lookups-cached-global/pom.xml
extensions-core/lookups-cached-global/src/test/java/org/apache/druid/query/lookup/NamespaceLookupExtractorFactoryTest.java
extensions-core/testing-tools/pom.xml
indexing-hadoop/pom.xml
indexing-hadoop/src/test/java/org/apache/druid/indexer/HadoopDruidIndexerJobTest.java
indexing-hadoop/src/test/java/org/apache/druid/indexer/MetadataStorageUpdaterJobTest.java
indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/SequenceMetadataTest.java
licenses.yaml
pom.xml
server/src/test/java/org/apache/druid/server/coordinator/duty/KillAuditLogTest.java
server/src/test/java/org/apache/druid/server/coordinator/duty/KillCompactionConfigTest.java
server/src/test/java/org/apache/druid/server/coordinator/duty/KillDatasourceMetadataTest.java
server/src/test/java/org/apache/druid/server/coordinator/duty/KillRulesTest.java
server/src/test/java/org/apache/druid/server/coordinator/duty/KillSupervisorsTest.java