From 9ae67cfbdcfd78a160f30ec6d0d231c73050b8da Mon Sep 17 00:00:00 2001 From: shuke <37901441+shuke987@users.noreply.github.com> Date: Sun, 12 Jul 2026 11:25:17 +0800 Subject: [PATCH] [fix](regression) Wait for show config output before parsing ### What problem does this PR solve? Issue Number: close #xxx Related PR: #xxx Problem Summary: The regression case started asynchronous stdout and stderr consumers for the show-config curl process, but only waited for the process itself before parsing stdout. The stdout consumer could still be copying the response, causing intermittent empty JSON input. Wait for both output consumers to finish before reading the exit value and parsing the response. ### Release note None ### Check List (For Author) - Test: Manual test - Parsed the changed case with Groovy 4.0.19 and verified a 51,904-byte process stdout payload is fully captured. - Behavior changed: No - Does this need documentation: No --- .../index_format_v2/test_mow_table_with_format_v2.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regression-test/suites/inverted_index_p0/index_format_v2/test_mow_table_with_format_v2.groovy b/regression-test/suites/inverted_index_p0/index_format_v2/test_mow_table_with_format_v2.groovy index 02aebbc3ecb258..3dacfe71a652f7 100644 --- a/regression-test/suites/inverted_index_p0/index_format_v2/test_mow_table_with_format_v2.groovy +++ b/regression-test/suites/inverted_index_p0/index_format_v2/test_mow_table_with_format_v2.groovy @@ -93,8 +93,8 @@ suite("test_mow_table_with_format_v2", "inverted_index_format_v2") { def process = cmd.execute() def output = new StringBuffer() def errorOutput = new StringBuffer() - process.consumeProcessOutput(output, errorOutput) - int exitCode = process.waitFor() + process.waitForProcessOutput(output, errorOutput) + int exitCode = process.exitValue() logger.info("Show config: code=" + exitCode + ", out=" + output + ", err=" + errorOutput) assertEquals(exitCode, 0) def configList = parseJson(output.toString().trim())