Skip to content

[IT][Bug]ServerITCaseBase fails when stderr contains "Picked up JAVA_TOOL_OPTIONS" #2631

@litiliu

Description

@litiliu

Search before asking

  • I searched in the issues and found nothing similar.

Fluss version

0.8.0 (latest release)

Please describe the bug 🐞

Summary

|| !process.getErrorOutput().toString().isEmpty(),

ServerITCaseBase treats any stderr output from the spawned server process as a startup failure. In Jenkins with withMaven, every JVM prints a line like:

Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path=".../pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="..."

This line goes to stderr and causes CoordinatorServerITCase / TabletServerITCase to fail even though the server starts.

Error

CoordinatorServerITCase.testRunServerUsingProcess(Path)
Server process failed to start: Picked up JAVA_TOOL_OPTIONS: ...

Environment

  • CI: Jenkins (withMaven enabled)
  • JDK: 17
  • Maven: Maven Wrapper (3.8.6) / Maven 3.6.1

Reproduction

Run integration tests in a Jenkins pipeline with withMaven enabled:

java.lang.IllegalStateException: 
Server process failed to start: Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dmaven.ext.class.path="/jenkins/workspace/wap-udp-fluss_add-jenkins@tmp/withMavene743bf1a/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/jenkins/workspace/wap-udp-fluss_add-jenkins@tmp/withMavene743bf1a" 

	at org.apache.fluss.server.ServerITCaseBase.waitUntilServerStartup(ServerITCaseBase.java:123)
	at org.apache.fluss.server.ServerITCaseBase.testRunServerUsingProcess(ServerITCaseBase.java:93)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(Intercept

Solution

Expected

The test should only fail on real server startup errors, not on the Picked up JAVA_TOOL_OPTIONS banner.

Actual

The test fails immediately because stderr is non-empty.

Proposed Fix

Filter out lines that start with Picked up JAVA_TOOL_OPTIONS: when deciding whether server startup failed, or only fail on stderr lines that indicate real errors.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions