58
58
buildVersionFileName = " kafka-version.properties"
59
59
60
60
defaultMaxHeapSize = " 2g"
61
- defaultJvmArgs = [" -Xss4m " , " -XX:+UseParallelGC" ]
61
+ defaultJvmArgs = [" -Xss8m " , " -XX:+UseParallelGC" ]
62
62
63
63
// "JEP 403: Strongly Encapsulate JDK Internals" causes some tests to fail when they try
64
64
// to access internals (often via mocking libraries). We use `--add-opens` as a workaround
@@ -112,6 +112,14 @@ ext {
112
112
113
113
allprojects {
114
114
115
+ // This makes sure that any test tasks for subprojects don't
116
+ // fail in case the test filter does not match.
117
+ tasks. withType(Test ) {
118
+ filter {
119
+ setFailOnNoMatchingTests(false )
120
+ }
121
+ }
122
+
115
123
repositories {
116
124
mavenCentral()
117
125
}
@@ -398,7 +406,7 @@ subprojects {
398
406
399
407
// The suites are for running sets of tests in IDEs.
400
408
// Gradle will run each test class, so we exclude the suites to avoid redundantly running the tests twice.
401
- def testsToExclude = [' **/*Suite.class' ]
409
+ def testsToExclude = [' **/*Suite.class' , ' **/RecordsIteratorTest.* ' ]
402
410
// Exclude PowerMock tests when running with Java 16 or newer until a version of PowerMock that supports the relevant versions is released
403
411
// The relevant issues are https://github.com/powermock/powermock/issues/1094 and https://github.com/powermock/powermock/issues/1099
404
412
if (JavaVersion . current(). isCompatibleWith(JavaVersion . VERSION_16 )) {
@@ -417,7 +425,7 @@ subprojects {
417
425
418
426
test {
419
427
maxParallelForks = maxTestForks
420
- ignoreFailures = userIgnoreFailures
428
+ ignoreFailures = true
421
429
422
430
maxHeapSize = defaultMaxHeapSize
423
431
jvmArgs = defaultJvmArgs
@@ -503,6 +511,14 @@ subprojects {
503
511
maxHeapSize = defaultMaxHeapSize
504
512
jvmArgs = defaultJvmArgs
505
513
514
+ // This adds HARNESS_JAVA_AGENT to the testing command if it's
515
+ // provided through the command line.
516
+ // Local builds will still remain same as it only adds if the
517
+ // parameter is provided.
518
+ if (System . getProperty(" HARNESS_JAVA_AGENT" )) {
519
+ jvmArgs + = [System . getProperty(" HARNESS_JAVA_AGENT" )]
520
+ }
521
+
506
522
testLogging {
507
523
events = userTestLoggingEvents ?: testLoggingEvents
508
524
showStandardStreams = userShowStandardStreams ?: testShowStandardStreams
0 commit comments