From 63089ee82e9a742cb2b4fe0eed4df1fbf9f8285d Mon Sep 17 00:00:00 2001 From: Idel Pivnitskiy Date: Wed, 26 Jun 2024 22:15:54 -0700 Subject: [PATCH] Always require native libraries for running tests (#2990) Motivation: In rare occasions tests may fail with ambiguous errors. After hours of debugging, the root cause may end up an inability to load native libraries. Modifications: - Enforce `io.servicetalk.transport.netty.requireNativeLibs=true` for running tests. Result: Significantly simplifies finding the root cause for hanging tests. --- .../gradle/plugin/internal/ServiceTalkLibraryPlugin.groovy | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servicetalk-gradle-plugin-internal/src/main/groovy/io/servicetalk/gradle/plugin/internal/ServiceTalkLibraryPlugin.groovy b/servicetalk-gradle-plugin-internal/src/main/groovy/io/servicetalk/gradle/plugin/internal/ServiceTalkLibraryPlugin.groovy index ddbb30a25b..523d445918 100644 --- a/servicetalk-gradle-plugin-internal/src/main/groovy/io/servicetalk/gradle/plugin/internal/ServiceTalkLibraryPlugin.groovy +++ b/servicetalk-gradle-plugin-internal/src/main/groovy/io/servicetalk/gradle/plugin/internal/ServiceTalkLibraryPlugin.groovy @@ -229,6 +229,10 @@ final class ServiceTalkLibraryPlugin extends ServiceTalkCorePlugin { jvmArgs "-server", "-Xms2g", "-Xmx4g", "-dsa", "-da", "-ea:io.servicetalk...", "-XX:+HeapDumpOnOutOfMemoryError" + + // Always require native libraries for running tests. This helps to make sure transport-level state machine + // receives all expected network events from Netty. + systemProperty "io.servicetalk.transport.netty.requireNativeLibs", "true" } dependencies {