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

Add test tasks for unpooled and direct buffer pooling to netty #46049

Merged
merged 3 commits into from
Aug 30, 2019
Merged
Changes from 1 commit
Commits
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
31 changes: 31 additions & 0 deletions modules/transport-netty4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* under the License.
*/

import org.elasticsearch.gradle.test.RestIntegTestTask

/*
TODOs:
* fix permissions such that only netty4 can open sockets etc?
Expand Down Expand Up @@ -67,6 +69,35 @@ integTestRunner {
systemProperty 'io.netty.allocator.numDirectArenas', '0'
}

TaskProvider<Test> unpooledTest = tasks.register("unpooledTest", Test) {
include '**/*Tests.class'
systemProperty 'es.set.netty.runtime.available.processors', 'false'
systemProperty 'io.netty.allocator.type', 'unpooled'
}
TaskProvider<Test> directBufferPoolingTest = tasks.register("directBufferPoolingTest", Test) {
include '**/*Tests.class'
systemProperty 'es.set.netty.runtime.available.processors', 'false'
systemProperty 'io.netty.allocator.numDirectArenas', '2'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure what to set for num arenas to test direct buffer pooling. Happy to change this to whatever you recommend @original-brownbear @tbrooks8

}
// TODO: we can't use task avoidance here because RestIntegTestTask does the testcluster creation
RestIntegTestTask unpooledIntegTest = tasks.create("unpooledIntegTest", RestIntegTestTask) {
runner {
systemProperty 'es.set.netty.runtime.available.processors', 'false'
}
}
testClusters.unpooledIntegTest {
systemProperty 'io.netty.allocator.type', 'unpooled'
}
RestIntegTestTask directBufferPoolingIntegTest = tasks.create("directBufferPoolingIntegTest", RestIntegTestTask) {
runner {
systemProperty 'es.set.netty.runtime.available.processors', 'false'
}
}
testClusters.directBufferPoolingIntegTest {
systemProperty 'io.netty.allocator.numDirectArenas', '2'
}
check.dependsOn(unpooledTest, directBufferPoolingTest, unpooledIntegTest, directBufferPoolingIntegTest)

thirdPartyAudit {
ignoreMissingClasses (
// classes are missing
Expand Down