Skip to content

Commit 5270a7a

Browse files
Merge remote-tracking branch 'origin/trunk' into internal_topics_creation
# Conflicts: # docs/getting-started/upgrade.md
2 parents 72924c6 + ec89db2 commit 5270a7a

196 files changed

Lines changed: 9832 additions & 2412 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LICENSE-binary

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -226,16 +226,16 @@ License Version 2.0:
226226
- jakarta.inject-api-2.0.1
227227
- jakarta.validation-api-3.0.2
228228
- javassist-3.30.2-GA
229-
- jetty-alpn-client-12.0.34
230-
- jetty-client-12.0.34
231-
- jetty-ee10-servlet-12.0.34
232-
- jetty-ee10-servlets-12.0.34
233-
- jetty-http-12.0.34
234-
- jetty-io-12.0.34
235-
- jetty-security-12.0.34
236-
- jetty-server-12.0.34
237-
- jetty-session-12.0.34
238-
- jetty-util-12.0.34
229+
- jetty-alpn-client-12.0.37
230+
- jetty-client-12.0.37
231+
- jetty-ee10-servlet-12.0.37
232+
- jetty-ee10-servlets-12.0.37
233+
- jetty-http-12.0.37
234+
- jetty-io-12.0.37
235+
- jetty-security-12.0.37
236+
- jetty-server-12.0.37
237+
- jetty-session-12.0.37
238+
- jetty-util-12.0.37
239239
- jose4j-0.9.6
240240
- jspecify-1.0.0
241241
- log4j-api-2.25.5

build.gradle

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,15 @@ project(':server') {
10381038
}
10391039

10401040
apply plugin: 'java-test-fixtures'
1041+
configurations {
1042+
// To prevent a UniqueResourceException due the same resource existing in both
1043+
// org.apache.directory.api/api-all and org.apache.directory.api/api-ldap-schema-data
1044+
testImplementation.exclude module: 'api-ldap-schema-data'
1045+
testFixturesImplementation.exclude module: 'api-ldap-schema-data'
1046+
testFixturesImplementation.exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
1047+
testCompileClasspath.exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
1048+
testRuntimeClasspath.exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
1049+
}
10411050

10421051
dependencies {
10431052
implementation libs.commonsValidator
@@ -1058,7 +1067,6 @@ project(':server') {
10581067
implementation log4j2Libs
10591068

10601069
testImplementation testFixtures(project(':clients'))
1061-
10621070
testImplementation libs.mockitoCore
10631071
testImplementation libs.junitJupiter
10641072
testImplementation testLog4j2Libs
@@ -1074,6 +1082,20 @@ project(':server') {
10741082
testFixturesImplementation project(':server-common')
10751083
testFixturesImplementation testFixtures(project(':server-common'))
10761084
testFixturesImplementation libs.junitJupiter
1085+
testFixturesImplementation(libs.apacheda) {
1086+
exclude group: 'xml-apis', module: 'xml-apis'
1087+
// `mina-core` is a transitive dependency for `apacheds` and `apacheda`.
1088+
// It is safer to use from `apacheds` since that is the implementation.
1089+
exclude module: 'mina-core'
1090+
}
1091+
testFixturesImplementation libs.apachedsCoreApi
1092+
testFixturesImplementation libs.apachedsInterceptorKerberos
1093+
testFixturesImplementation libs.apachedsProtocolShared
1094+
testFixturesImplementation libs.apachedsProtocolKerberos
1095+
testFixturesImplementation libs.apachedsProtocolLdap
1096+
testFixturesImplementation libs.apachedsLdifPartition
1097+
testFixturesImplementation libs.apachedsMavibotPartition
1098+
testFixturesImplementation libs.apachedsJdbmPartition
10771099

10781100
testRuntimeOnly runtimeTestLibs
10791101
}
@@ -1142,9 +1164,6 @@ project(':core') {
11421164
implementation.exclude module: 'jmxri'
11431165
implementation.exclude module: 'jmxtools'
11441166
implementation.exclude module: 'mail'
1145-
// To prevent a UniqueResourceException due the same resource existing in both
1146-
// org.apache.directory.api/api-all and org.apache.directory.api/api-ldap-schema-data
1147-
testImplementation.exclude module: 'api-ldap-schema-data'
11481167
releaseOnly
11491168
}
11501169

@@ -1200,6 +1219,7 @@ project(':core') {
12001219
testImplementation project(':test-common:test-common-runtime')
12011220
testImplementation project(':test-common:test-common-internal-api')
12021221
testImplementation project(':test-common:test-common-util')
1222+
testImplementation libs.apachedsCoreApi
12031223
testImplementation libs.bcpkix
12041224
testImplementation libs.mockitoCore
12051225
testImplementation(libs.apacheda) {
@@ -1220,6 +1240,22 @@ project(':core') {
12201240
testImplementation testLog4j2Libs
12211241
testImplementation libs.mockOAuth2Server
12221242

1243+
configurations {
1244+
// To prevent a UniqueResourceException due the same resource existing in both
1245+
// org.apache.directory.api/api-all and org.apache.directory.api/api-ldap-schema-data
1246+
testRuntimeOnly.exclude module: 'api-ldap-schema-data'
1247+
}
1248+
1249+
testRuntimeOnly(libs.apacheda) {
1250+
exclude group: 'xml-apis', module: 'xml-apis'
1251+
// `mina-core` is a transitive dependency for `apacheds` and `apacheda`.
1252+
// It is safer to use from `apacheds` since that is the implementation.
1253+
exclude module: 'mina-core'
1254+
}
1255+
testRuntimeOnly libs.apachedsInterceptorKerberos
1256+
testRuntimeOnly libs.apachedsProtocolKerberos
1257+
testRuntimeOnly libs.apachedsProtocolLdap
1258+
testRuntimeOnly libs.apachedsLdifPartition
12231259
testRuntimeOnly runtimeTestLibs
12241260
}
12251261

@@ -2175,7 +2211,6 @@ project(':clients:clients-integration-tests') {
21752211
testImplementation project(':server')
21762212
testImplementation project(':storage')
21772213
testImplementation testFixtures(project(':storage'))
2178-
testImplementation project(':core').sourceSets.test.output
21792214
testImplementation testFixtures(project(':clients'))
21802215
implementation project(':server-common')
21812216
testImplementation testFixtures(project(':server-common'))
@@ -2474,6 +2509,7 @@ project(':storage') {
24742509
testImplementation project(':test-common:test-common-runtime')
24752510
testImplementation project(':test-common:test-common-util')
24762511
testImplementation project(':server')
2512+
testImplementation testFixtures(project(':server'))
24772513
testImplementation project(':server-common')
24782514
testImplementation testFixtures(project(':server-common'))
24792515
testImplementation testFixtures(project(':metadata'))
@@ -2665,7 +2701,6 @@ project(':tools') {
26652701
testImplementation project(':connect:api')
26662702
testImplementation project(':connect:runtime')
26672703
testImplementation testFixtures(project(':connect:runtime'))
2668-
testImplementation project(':storage:storage-api').sourceSets.main.output
26692704
testImplementation testFixtures(project(':storage'))
26702705
testImplementation project(':streams')
26712706
testImplementation project(':streams').sourceSets.test.output
@@ -4135,6 +4170,7 @@ gradle.projectsEvaluated {
41354170
'metadata': ':metadata',
41364171
'raft': ':raft',
41374172
'connect/runtime': ':connect:runtime',
4173+
'core': ':core',
41384174
]
41394175
allprojects { proj ->
41404176
proj.configurations.all { config ->

checkstyle/import-control-core.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@
6767
</subpackage>
6868

6969
<subpackage name="security">
70-
<allow pkg="org.apache.commons" />
71-
<allow pkg="org.apache.directory" />
72-
<allow pkg="org.apache.mina.core.service" />
7370
<allow pkg="org.apache.kafka.test" />
7471
</subpackage>
7572

checkstyle/import-control-server.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,14 @@
109109
</subpackage>
110110

111111
<subpackage name="security">
112+
<allow pkg="org.apache.commons" />
113+
<allow pkg="org.apache.directory" />
112114
<allow pkg="org.apache.kafka.common.resource" />
113115
<allow pkg="org.apache.kafka.network" />
114116
<allow pkg="org.apache.kafka.server" />
115117
<allow pkg="org.apache.kafka.server.authorizer" />
116118
<allow class="org.apache.kafka.controller.MockAclMutator" />
119+
<allow pkg="org.apache.mina.core.service" />
117120
</subpackage>
118121

119122
<subpackage name="network">

checkstyle/suppressions.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
files="(Sender|Fetcher|FetchRequestManager|OffsetFetcher|KafkaConsumer|Metrics|RequestResponse|TransactionManager|KafkaAdminClient|Message|KafkaProducer)Test.java"/>
9090

9191
<suppress checks="ClassFanOutComplexity"
92-
files="(ConsumerCoordinator|KafkaConsumer|RequestResponse|Fetcher|FetchRequestManager|KafkaAdminClient|Message|KafkaProducer|NetworkClient)Test.java"/>
92+
files="(ConsumerCoordinator|KafkaConsumer|RequestResponse|Fetcher|FetchRequestManager|KafkaAdminClient|Message|KafkaProducer|NetworkClient|StreamsGroupHeartbeatRequestManager)Test.java"/>
9393

9494
<suppress checks="ClassFanOutComplexity"
9595
files="MockAdminClient.java"/>
@@ -244,6 +244,8 @@
244244
files="(ProduceBenchSpec|ConsumeBenchSpec|SustainedConnectionSpec).java"/>
245245
<suppress id="dontUseSystemExit"
246246
files="(VerifiableConsumer|VerifiableProducer|VerifiableShareConsumer).java"/>
247+
<suppress checks="MethodLength"
248+
files="ProducerPerformance\.java"/>
247249

248250
<!-- Shell -->
249251
<suppress checks="CyclomaticComplexity"

clients/clients-integration-tests/src/test/java/org/apache/kafka/clients/ClientsTestUtils.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,23 @@ public static <K, V> List<ConsumerRecord<K, V>> consumeRecords(
7575
Consumer<K, V> consumer,
7676
int numRecords,
7777
int maxPollRecords
78+
) throws InterruptedException {
79+
return consumeRecords(consumer, numRecords, maxPollRecords, 60000);
80+
}
81+
82+
public static <K, V> List<ConsumerRecord<K, V>> consumeRecords(
83+
Consumer<K, V> consumer,
84+
int numRecords,
85+
int maxPollRecords,
86+
long maxWaitMs
7887
) throws InterruptedException {
7988
List<ConsumerRecord<K, V>> consumedRecords = new ArrayList<>();
8089
TestUtils.waitForCondition(() -> {
8190
var records = consumer.poll(Duration.ofMillis(100));
8291
records.forEach(consumedRecords::add);
8392
assertTrue(records.count() <= maxPollRecords);
8493
return consumedRecords.size() >= numRecords;
85-
}, 60000, "Timed out before consuming expected " + numRecords + " records.");
94+
}, maxWaitMs, "Timed out before consuming expected " + numRecords + " records.");
8695

8796
return consumedRecords;
8897
}

0 commit comments

Comments
 (0)