Skip to content

[fix](regression-test) fix two muted test cases (Groovy property access + flaky SHOW PROCESSLIST)#63645

Open
morningman wants to merge 2 commits into
apache:masterfrom
morningman:master-fix-muted-regression-tests
Open

[fix](regression-test) fix two muted test cases (Groovy property access + flaky SHOW PROCESSLIST)#63645
morningman wants to merge 2 commits into
apache:masterfrom
morningman:master-fix-muted-regression-tests

Conversation

@morningman
Copy link
Copy Markdown
Contributor

Summary

Fix two regression-test cases that are currently muted on branch-4.0 (and have the same bugs on master, just not yet observed/muted). Neither requires any FE/BE changes — both are Groovy / test-harness issues.

The companion back-port to branch-4.0 is #63644.

1. datatype_p0.create_table_with_nested_type

regression-test/plugins/plugins_create_table_nested_type.groovy:136,138

-    for (int i = 0; i < res.size; i++) {
+    for (int i = 0; i < res.size(); i++) {
         def date_type_str = ""
-        for (int j = 0; j < res[i].size; j++) {
+        for (int j = 0; j < res[i].size(); j++) {
             date_type_str += res[i][j] + " "
         }

On the Groovy runtime used by the regression framework, java.util.ArrayList does not expose size as a JavaBean property, so res.size falls through GPath into getAt(Iterable, ...), iterates the outer list, and tries to read .size from each inner Integer — throwing MissingPropertyException: No such property: size for class: java.lang.Integer. The test fails in ~15 ms before any DDL is sent to FE.

Same root cause as #62454 / #62455.

2. auth_call.test_show_charset_auth.test_show_no_auth

regression-test/suites/auth_call/test_show_charset_auth.groovy:68

-        assertTrue(res1.size() == 1)
+        def ownSessions = res1.findAll { it[2] == user }
+        assertTrue(ownSessions.size() >= 1)

After granting grant_priv, SHOW PROCESSLIST returns all sessions to any caller that satisfies PrivPredicate.ADMIN (see ConnectPoolMgr.listConnection), so in the parallel pipeline this user sees 20+ concurrent sessions from other suites. The == 1 assertion is structurally unsafe — replace it with a per-user filter that matches the same pattern already used at line 49 of the file. Column index 2 is the User column (ConnectContext.ThreadInfo.toRow).

Test plan

  • After merge, unmute the two test cases on TeamCity (branch-4.0):
    • datatype_p0.nested_types.create_table.create_table_with_nested_type
    • auth_call.test_show_charset_auth.test_show_no_auth
  • Confirm each test passes (or surfaces a different, real failure) on the next P0 run.

🤖 Generated with Claude Code

morningman and others added 2 commits May 25, 2026 11:24
…eate_table plugin

Replace `res.size` / `res[i].size` property accesses with `res.size()` /
`res[i].size()` method calls in
`regression-test/plugins/plugins_create_table_nested_type.groovy`.

On the Groovy runtime used by the regression framework, `java.util.ArrayList`
does not expose `size` as a JavaBean property, so the property access falls
through to the `getAt(Iterable, ...)` path and tries to read `.size` from each
inner `Integer` element, throwing:

  groovy.lang.MissingPropertyException: Exception evaluating property 'size'
  for java.util.ArrayList, Reason:
  groovy.lang.MissingPropertyException: No such property: size for class:
  java.lang.Integer

This makes the test `datatype_p0.nested_types.create_table.create_table_with_nested_type`
fail in ~15 ms before any DDL is sent to FE. The test is currently muted on
TeamCity; this fix should unblock unmuting.

Same GPath `.size` vs `.size()` pattern as apache#62454 and apache#62455.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`test_show_no_auth` asserts that `SHOW PROCESSLIST` returns exactly 1 row
after granting `grant_priv` to the test user. But `ConnectPoolMgr.listConnection()`
returns *all* sessions to any caller that satisfies `PrivPredicate.ADMIN`, so
in the parallel regression pipeline this user sees the concurrent sessions of
many other suites (e.g. 23 rows in the last failing build on branch-4.0).

Replace the unsafe `== 1` check with a count of sessions owned by the current
user. This aligns with the same check earlier in the file (line 49) that uses
`>= 1`, and actually verifies the intended invariant (the user can see their
own session) without depending on parallel pipeline isolation.

```diff
-        assertTrue(res1.size() == 1)
+        def ownSessions = res1.findAll { it[2] == user }
+        assertTrue(ownSessions.size() >= 1)
```

Column index 2 of `SHOW PROCESSLIST` is the User column (see
`ConnectContext.ThreadInfo.toRow`).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@morningman
Copy link
Copy Markdown
Contributor Author

run buildall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants