BobSong-dev opened a new pull request, #7049:
URL: https://github.com/apache/shenyu/pull/7049

   ## Background
   
   Both mock expression generators stored the request variable in one static 
`EvaluationContext`. Concurrent requests could overwrite `req` between context 
setup and expression evaluation, causing a mock response for one request to 
read another request's body or parameters.
   
   ## Changes
   
   - Create an independent `EvaluationContext` for each expression evaluation;
   - Apply the isolation to both the safe and standard SpEL generators;
   - Add concurrent regression coverage for request-specific JSON values.
   
   Fixes #6882
   
   ## Verification
   
   - `mvn.cmd -o -nsu -pl shenyu-plugin/shenyu-plugin-mock -am 
-Dtest=ExpressionGeneratorTest -DfailIfNoTests=false -Djacoco.skip=true test`: 
Tests run: 15, Failures: 0, Errors: 0, Skipped: 0;
   - Checkstyle: 0 violations;
   - `BUILD SUCCESS`.
   
   The full reactor suite was not completed in this environment because the 
available JDK 25 is newer than the bundled Byte Buddy version; unrelated 
Mockito tests in `shenyu-common` reported 23 errors.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to