Skip to content

Commit

Permalink
Mockito 5
Browse files Browse the repository at this point in the history
Signed-off-by: David Venable <[email protected]>
  • Loading branch information
dlvenable committed Jul 8, 2024
1 parent 39c74db commit 5023df5
Show file tree
Hide file tree
Showing 47 changed files with 6 additions and 90 deletions.
1 change: 0 additions & 1 deletion data-prepper-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ dependencies {
implementation 'software.amazon.awssdk:servicediscovery'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
testImplementation testLibs.junit.vintage
testImplementation testLibs.mockito.inline
testImplementation libs.commons.lang3
testImplementation project(':data-prepper-test-event')
testImplementation project(':data-prepper-test-common')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;

import org.opensearch.dataprepper.plugins.buffer.blockingbuffer.BlockingBuffer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;

import java.util.Arrays;
import java.util.concurrent.ExecutionException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;
import software.amazon.awssdk.services.cloudwatch.CloudWatchAsyncClient;

import static org.hamcrest.CoreMatchers.notNullValue;
Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion data-prepper-logstash-configuration/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ dependencies {
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation libs.commons.lang3
testImplementation testLibs.slf4j.simple
testImplementation testLibs.mockito.inline
}

generateGrammarSource {
Expand Down
5 changes: 0 additions & 5 deletions data-prepper-pipeline-parser/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ dependencies {
testImplementation testLibs.bundles.junit
testImplementation testLibs.bundles.mockito
testImplementation testLibs.hamcrest
testImplementation 'org.powermock:powermock-module-junit4:2.0.9'
testImplementation 'org.powermock:powermock-api-mockito2:2.0.9'
testImplementation 'org.assertj:assertj-core:3.20.2'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.powermock:powermock-module-junit4:2.0.9'
testImplementation 'org.powermock:powermock-api-mockito2:2.0.9'
compileOnly 'org.projectlombok:lombok:1.18.20'
annotationProcessor 'org.projectlombok:lombok:1.18.20'
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.sameInstance;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.powermock.api.mockito.PowerMockito.mock;
import static org.powermock.api.mockito.PowerMockito.when;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

@ExtendWith(MockitoExtension.class)
class EventKeyDeserializerTest {
Expand Down
1 change: 0 additions & 1 deletion data-prepper-plugin-framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ dependencies {
}
implementation libs.reflections.core
implementation 'com.fasterxml.jackson.core:jackson-databind'
testImplementation testLibs.mockito.inline
}
1 change: 0 additions & 1 deletion data-prepper-plugins/aggregate-processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ dependencies {
implementation libs.opentelemetry.proto
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'io.micrometer:micrometer-core'
testImplementation testLibs.mockito.inline
}

jacocoTestCoverageVerification {
Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion data-prepper-plugins/cloudwatch-logs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ dependencies {
implementation 'org.projectlombok:lombok:1.18.26'
implementation 'org.hibernate.validator:hibernate-validator:8.0.0.Final'
testImplementation project(path: ':data-prepper-test-common')
testImplementation testLibs.mockito.inline
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
}
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion data-prepper-plugins/common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ dependencies {
testImplementation project(':data-prepper-plugins:blocking-buffer')
testImplementation project(':data-prepper-test-event')
testImplementation libs.commons.io
testImplementation testLibs.mockito.inline
}

jacocoTestCoverageVerification {
Expand Down
1 change: 0 additions & 1 deletion data-prepper-plugins/decompress-processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ dependencies {
implementation project(':data-prepper-plugins:common')
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'io.micrometer:micrometer-core'
testImplementation testLibs.mockito.inline
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ dependencies {
implementation 'software.amazon.awssdk:dynamodb'
implementation 'software.amazon.awssdk:dynamodb-enhanced'
implementation 'software.amazon.awssdk:sts'
testImplementation testLibs.mockito.inline
}

test {
Expand Down
1 change: 0 additions & 1 deletion data-prepper-plugins/dynamodb-source/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@ dependencies {
implementation project(path: ':data-prepper-plugins:buffer-common')


testImplementation testLibs.mockito.inline
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'
}

This file was deleted.

1 change: 0 additions & 1 deletion data-prepper-plugins/grok-processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ dependencies {
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation "io.krakens:java-grok:0.1.9"
implementation 'io.micrometer:micrometer-core'
testImplementation testLibs.mockito.inline
testImplementation project(':data-prepper-test-common')
}

Expand Down
1 change: 0 additions & 1 deletion data-prepper-plugins/http-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
dependencies {
implementation 'org.apache.httpcomponents:httpcore:4.4.16'
testImplementation testLibs.bundles.junit
testImplementation testLibs.mockito.inline
}

jacocoTestCoverageVerification {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions data-prepper-plugins/kafka-plugins/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ dependencies {
implementation 'software.amazon.awssdk:s3'
implementation 'software.amazon.awssdk:apache-client'

testImplementation testLibs.mockito.inline
testImplementation 'org.yaml:snakeyaml:2.2'
testImplementation testLibs.spring.test
testImplementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
Expand All @@ -62,12 +61,10 @@ dependencies {
testImplementation project(':data-prepper-core')
testImplementation project(':data-prepper-plugin-framework')
testImplementation project(':data-prepper-pipeline-parser')
testImplementation testLibs.mockito.inline
testImplementation 'org.apache.kafka:kafka_2.13:3.6.1'
testImplementation 'org.apache.kafka:kafka_2.13:3.6.1:test'
testImplementation 'org.apache.curator:curator-test:5.5.0'
testImplementation('com.kjetland:mbknor-jackson-jsonschema_2.13:1.0.39')
testImplementation group: 'org.powermock', name: 'powermock-api-mockito2', version: '2.0.9'
testImplementation project(':data-prepper-plugins:otel-metrics-source')
testImplementation project(':data-prepper-plugins:otel-proto-common')
testImplementation libs.opentelemetry.proto
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion data-prepper-plugins/mongodb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ dependencies {
implementation project(path: ':data-prepper-plugins:common')


testImplementation testLibs.mockito.inline
testImplementation testLibs.bundles.junit
testImplementation testLibs.slf4j.simple
testImplementation project(path: ':data-prepper-test-common')
Expand Down
1 change: 0 additions & 1 deletion data-prepper-plugins/opensearch/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ dependencies {
testImplementation 'net.bytebuddy:byte-buddy:1.14.12'
testImplementation 'net.bytebuddy:byte-buddy-agent:1.14.12'
testImplementation testLibs.slf4j.simple
testImplementation testLibs.mockito.inline
}

sourceSets {
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion data-prepper-plugins/otel-logs-source/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ dependencies {
implementation libs.bouncycastle.bcprov
implementation libs.bouncycastle.bcpkix
testImplementation 'org.assertj:assertj-core:3.25.3'
testImplementation testLibs.mockito.inline
testImplementation libs.commons.io
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ dependencies {
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'
implementation libs.guava.core
testImplementation 'org.assertj:assertj-core:3.25.3'
testImplementation testLibs.mockito.inline
}

jacocoTestCoverageVerification {
Expand Down
1 change: 0 additions & 1 deletion data-prepper-plugins/otel-metrics-source/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ dependencies {
implementation libs.bouncycastle.bcprov
implementation libs.bouncycastle.bcpkix
testImplementation 'org.assertj:assertj-core:3.25.3'
testImplementation testLibs.mockito.inline
testImplementation libs.commons.io
}

Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion data-prepper-plugins/otel-trace-raw-processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dependencies {
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'
implementation libs.caffeine
testImplementation 'org.assertj:assertj-core:3.25.3'
testImplementation testLibs.mockito.inline
}

jacocoTestCoverageVerification {
Expand Down
1 change: 0 additions & 1 deletion data-prepper-plugins/otel-trace-source/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ dependencies {
implementation libs.bouncycastle.bcprov
implementation libs.bouncycastle.bcpkix
testImplementation 'org.assertj:assertj-core:3.25.3'
testImplementation testLibs.mockito.inline
testImplementation testLibs.slf4j.simple
testImplementation libs.commons.io
}
Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion data-prepper-plugins/rds-source/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dependencies {
implementation 'com.fasterxml.jackson.core:jackson-core'
implementation 'com.fasterxml.jackson.core:jackson-databind'

testImplementation testLibs.mockito.inline
testImplementation project(path: ':data-prepper-test-common')
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'
}

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion data-prepper-plugins/service-map-stateful/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ dependencies {
exclude group: 'com.google.protobuf', module: 'protobuf-java'
}
implementation libs.protobuf.core
testImplementation testLibs.mockito.inline
}

jacocoTestCoverageVerification {
Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ dependencyResolutionManagement {
}
testLibs {
version('junit', '5.8.2')
version('mockito', '3.11.2')
version('mockito', '5.12.0')
version('hamcrest', '2.2')
version('awaitility', '4.2.0')
version('spring', '5.3.28')
Expand Down

0 comments on commit 5023df5

Please sign in to comment.