Skip to content

fix: flaky t/admin/filter.t due to url encoding for query params#12370

Merged
nic-6443 merged 2 commits into
apache:masterfrom
nic-6443:nic/fix-filter-case
Jun 24, 2025
Merged

fix: flaky t/admin/filter.t due to url encoding for query params#12370
nic-6443 merged 2 commits into
apache:masterfrom
nic-6443:nic/fix-filter-case

Conversation

@nic-6443

@nic-6443 nic-6443 commented Jun 23, 2025

Copy link
Copy Markdown
Member

Description

failed jobs:
https://github.com/apache/apisix/actions/runs/15817495697/job/44579024603
https://github.com/apache/apisix/actions/runs/15821515715/job/44591668640
image

the result of

ngx.encode_args({ service_id = "1", upstream_id = "1" })

is service_id=1&upstream_id=1 or upstream_id=1&service_id=1, the order of service_id and upstream_id is random.
so the final uri is /apisix/admin/routes?filter=service_id=1&upstream_id=1 or /apisix/admin/routes?filter=upstream_id=1&service_id=1, because second one meaning only filter by upstream_id=1, and the result is same as service_id=1 && upstream_id=1, so this test case working sometimes.

Which issue(s) this PR fixes:

Fixes #

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 23, 2025
f
Signed-off-by: Nic <[email protected]>
@dosubot dosubot Bot added the bug Something isn't working label Jun 23, 2025
@nic-6443
nic-6443 merged commit 32b4cbb into apache:master Jun 24, 2025
25 checks passed
@nic-6443
nic-6443 deleted the nic/fix-filter-case branch June 24, 2025 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants