arextest / arextest/arex-agent-java
[Bug] Servlet 请求的回放结果与预期不符
- Dominant language
- Java
- Stars
- 564
- Forks
- 140
- Avg merge
- 36m
- Merged PRs (30d)
- 2
Description
### Search before asking
- [X] I have searched the existing [issues](https://github.com/arextest/arex-agent-java/issues) before asking.
### AREX Test Service
AREX Java Agent (arextest/arex-agent-java)
### Current Behavior
测试场景:http 入口请求 apollo
遇到以下问题:
1、通过 arex-web 进行 Servlet 请求的回放时,目标机器会生成 4 次arex-replay-id
2、调试发现,第 1 次回放开始,执行到 RequestHandlerManager#preHandle 时,REQUEST_HANDLER_CACHE 缓存总为空,因为 REQUEST_HANDLER_CACHE 的初始化处理在 RequestHandlerManager#preHandle 后,导致未触发 ApolloServletV3RequestHandler#preHandle 回放逻辑,其余3次回放,由于 REQUEST_HANDLER_CACHE 已完成初始化,逻辑正常
### Expected Behavior
1、对指定时间段内的 recordId 进行回放,只回放 1 次,生成 1 个 arex-replay-id
2、首次回放时就可以获取到 apollo 的录制配置
### Steps To Reproduce



### Anything else
_No response_
### Are you willing to submit a pull request to fix on your own?
- [X] Yes I am willing to submit a pull request on my own!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at RequestHandlerManager#preHandle and trace when REQUEST_HANDLER_CACHE is initialized relative to it. Then inspect ApolloServletV3RequestHandler#preHandle and reproduce the Servlet replay described in the issue. Done means one arex-replay-id is generated and the Apollo recording configuration is available on the first replay.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100