Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-13187: Replace EasyMock / PowerMock with Mockito in DistributedHerderTest #14102

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d77a997
KAFKA-13187: Replace EasyMock / PowerMock with Mockito in Distributed…
yashmayya Jul 26, 2023
410f9f4
Modify DistributedHerder testing constructor to use array instead of …
yashmayya Jul 31, 2023
43f69ea
Clarify intent of testRebalance using appropriate spacing and an addi…
yashmayya Aug 9, 2023
fd0f339
Similar spacing changes elsewhere
yashmayya Aug 9, 2023
20b3e72
Add additional verification between ticks to verify number of calls t…
yashmayya Aug 9, 2023
8fab536
Add verification for call to Worker::stopAndAwaitConnector in revokeA…
yashmayya Aug 9, 2023
9c648ad
Remove unnecessary additional tick in testCreateConnectorFailedValida…
yashmayya Aug 9, 2023
cc08bb1
Add additional verification for number of times the connector is stop…
yashmayya Aug 9, 2023
9873ee3
Verify no more interactions with the RestartPlan mocks in restart tests
yashmayya Aug 9, 2023
3315f6b
Update herder config snapshot in testDoRestartConnectorAndTasksOnlyCo…
yashmayya Aug 9, 2023
6d5ab06
Check that the connector / task statuses are updated to RESTARTING in…
yashmayya Aug 9, 2023
022ac0a
Add additional verification for number of times the task is stopped (…
yashmayya Aug 9, 2023
3ce2592
Use expectConfigRefreshAndSnapshot in testConnectorConfigAdded
yashmayya Aug 9, 2023
73b7194
Fix semantics of testConnectorConfigAdded and testTaskConfigAdded
yashmayya Aug 9, 2023
315b780
Make poll verifications directly after tick calls in key rotation tests
yashmayya Aug 9, 2023
4f0dff6
Verify no more interactions with putTaskConfigs callback in request s…
yashmayya Aug 9, 2023
cbddfac
Remove now redundant comment in testExternalZombieFencingRequestDelay…
yashmayya Aug 9, 2023
b71c288
Explicitly verify that there is a single fence zombies call made per …
yashmayya Aug 9, 2023
12e647f
Verify no more interactions with rest client in expectAndVerifyTaskRe…
yashmayya Aug 9, 2023
98d7be1
Remove redundant expectAnyTicks method
yashmayya Aug 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,6 @@ subprojects {
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_16)) {
testsToExclude.addAll([
// connect tests
"**/DistributedHerderTest.*",
"**/KafkaConfigBackingStoreTest.*",
"**/KafkaBasedLogTest.*", "**/StandaloneHerderTest.*",
"**/WorkerSinkTaskTest.*", "**/WorkerSinkTaskThreadedTest.*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ public class DistributedHerder extends AbstractHerder implements Runnable {

// Visible for testing
ExecutorService forwardRequestExecutor;
private final ExecutorService herderExecutor;
// Visible for testing
final ExecutorService herderExecutor;
// Visible for testing
ExecutorService startAndStopExecutor;
private final WorkerGroupMember member;
Expand Down Expand Up @@ -274,7 +275,8 @@ public DistributedHerder(DistributedConfig config,
ConnectorClientConfigOverridePolicy connectorClientConfigOverridePolicy,
List<String> restNamespace,
ExecutorService forwardRequestExecutor,
AutoCloseable... uponShutdown) {
// https://github.com/mockito/mockito/issues/2601 explains why we can't use varargs here
AutoCloseable[] uponShutdown) {
super(worker, workerId, kafkaClusterId, statusBackingStore, configBackingStore, connectorClientConfigOverridePolicy);

this.time = time;
Expand Down
Loading