[Task] — All 11 `PredicateJudge` SPI routing-condition matchers have ZERO test
- Dominant language
- Java
- Stars
- 8.8k
- Forks
- 3.1k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 85
Description
- severity: Critical; files (all under `shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/condition/judge/`): `EqualsPredicateJudge.java:29`, `MatchPredicateJudge.java:31`, `RegexPredicateJudge.java:29`, `PathPatternPredicateJudge.java:34`, `ContainsPredicateJudge.java`, `StartsWithPredicateJudge.java`, `EndsWithPredicateJudge.java`, `BlankPredicateJudge.java`, `ExcludePredicateJudge.java`, `TimerAfterPredicateJudge.java`, `TimerBeforePredicateJudge.java`
- description: These 11 SPI classes decide whether a selector/rule matches an incoming request — i.e. they govern routing of all traffic. None is referenced by any test file (verified by content grep). `RegexPredicateJudge` is also the site of PERF-01 (per-request regex compile) and FUNC-C3 (TimerAfter/TimerBefore inconsistency) — yet the match logic itself is untested.
- impact: Mis-routing regressions land silently.
- suggested_fix: Add judge unit tests for match/no-match/edge cases for each.
---
_Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/00-consolidated-critical-high.md`](docs/scan2-2026-08-02/00-consolidated-critical-high.md)._
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/condition/judge/ and read the 11 listed PredicateJudge classes, then look for the repository's unit-test conventions. Add tests covering match, no-match, and relevant edge cases for each matcher, including RegexPredicateJudge and the timer judges; done means all 11 classes have executable coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100