Some Gradle build optimizations
This commit is contained in:
13
build.gradle
13
build.gradle
@@ -322,11 +322,6 @@ configure(javaProjects) { subproject ->
|
||||
|
||||
compileKotlin.dependsOn updateCopyrights
|
||||
|
||||
test {
|
||||
maxHeapSize = '2g'
|
||||
jvmArgs '-XX:+HeapDumpOnOutOfMemoryError'
|
||||
}
|
||||
|
||||
tasks.register('testAll', Test) { dependsOn['check'] }
|
||||
|
||||
gradle.taskGraph.whenReady { graph ->
|
||||
@@ -335,7 +330,7 @@ configure(javaProjects) { subproject ->
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(Test).all {
|
||||
tasks.withType(Test).configureEach {
|
||||
// suppress all console output during testing unless running `gradle -i`
|
||||
logging.captureStandardOutput(LogLevel.INFO)
|
||||
|
||||
@@ -347,7 +342,11 @@ configure(javaProjects) { subproject ->
|
||||
|
||||
useJUnitPlatform()
|
||||
|
||||
reports.junitXml.required = false
|
||||
|
||||
enableAssertions = false
|
||||
|
||||
forkEvery = 1000
|
||||
}
|
||||
|
||||
checkstyle {
|
||||
@@ -542,7 +541,7 @@ project('spring-integration-core') {
|
||||
classpath.from(sourceSets['main'].runtimeClasspath)
|
||||
externalDocumentationLink {
|
||||
url.set(new URL("https://docs.spring.io/spring-integration/docs/$version/api/"))
|
||||
packageListUrl.set(file("$buildDir/docs/javadoc/element-list").toURI().toURL())
|
||||
packageListUrl.set(file('build/docs/javadoc/element-list').toURI().toURL())
|
||||
}
|
||||
externalDocumentationLink {
|
||||
url.set(new URL('https://projectreactor.io/docs/core/release/api/'))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
version=6.3.0-SNAPSHOT
|
||||
org.gradle.jvmargs=-Xmx1536M -Dfile.encoding=UTF-8
|
||||
org.gradle.jvmargs=-Xmx2g -XX:+HeapDumpOnOutOfMemoryError -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8
|
||||
kotlin.jvm.target.validation.mode=IGNORE
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -149,7 +149,7 @@ public class ApplicationContextMessageBusTests {
|
||||
this.context.registerEndpoint("testEndpoint2", endpoint2);
|
||||
this.context.refresh();
|
||||
inputChannel.send(new GenericMessage<>("testing"));
|
||||
Message<?> message1 = outputChannel1.receive(10000);
|
||||
Message<?> message1 = outputChannel1.receive(100);
|
||||
Message<?> message2 = outputChannel2.receive(0);
|
||||
assertThat(message1 == null ^ message2 == null).as("exactly one message should be null").isTrue();
|
||||
}
|
||||
@@ -187,8 +187,7 @@ public class ApplicationContextMessageBusTests {
|
||||
this.context.registerEndpoint("testEndpoint2", endpoint2);
|
||||
this.context.refresh();
|
||||
inputChannel.send(new GenericMessage<>("testing"));
|
||||
latch.await(500, TimeUnit.MILLISECONDS);
|
||||
assertThat(latch.getCount()).as("both handlers should have been invoked").isEqualTo(0);
|
||||
assertThat(latch.await(500, TimeUnit.MILLISECONDS)).isTrue();
|
||||
Message<?> message1 = outputChannel1.receive(500);
|
||||
Message<?> message2 = outputChannel2.receive(500);
|
||||
assertThat(message1).as("both handlers should have replied to the message").isNotNull();
|
||||
@@ -208,9 +207,9 @@ public class ApplicationContextMessageBusTests {
|
||||
channelAdapter.setOutputChannel(outputChannel);
|
||||
this.context.registerEndpoint("testChannel", channelAdapter);
|
||||
this.context.refresh();
|
||||
latch.await(2000, TimeUnit.MILLISECONDS);
|
||||
assertThat(latch.await(2, TimeUnit.SECONDS)).isTrue();
|
||||
Message<?> message = errorChannel.receive(5000);
|
||||
assertThat(outputChannel.receive(100)).isNull();
|
||||
assertThat(outputChannel.receive(10)).isNull();
|
||||
assertThat(message).as("message should not be null").isNotNull();
|
||||
assertThat(message instanceof ErrorMessage).isTrue();
|
||||
Throwable exception = ((ErrorMessage) message).getPayload();
|
||||
@@ -235,8 +234,7 @@ public class ApplicationContextMessageBusTests {
|
||||
this.context.registerEndpoint("testEndpoint", endpoint);
|
||||
this.context.refresh();
|
||||
errorChannel.send(new ErrorMessage(new RuntimeException("test-exception")));
|
||||
latch.await(1000, TimeUnit.MILLISECONDS);
|
||||
assertThat(latch.getCount()).as("handler should have received error message").isEqualTo(0);
|
||||
assertThat(latch.await(1, TimeUnit.SECONDS)).isTrue();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user