liuxiran commented on pull request #2943:
URL: https://github.com/apache/apisix/pull/2943#issuecomment-738798267
> describe a strange phenomenon, I was using `/route_status` api and create
new routes because I found that using route id 1 and `/hello` always failed
when I ran my local test cases, even through other test cases, like
>
> ```
> $prove -I../test-nginx/lib -I./ -r -s t/router/radixtree-host-uri.t
> t/router/radixtree-host-uri.t .. 10/?
> # Failed test 'TEST 5: hit routes - status code ok'
> # at /usr/local/apisix/../test-nginx/lib/Test/Nginx/Socket.pm line 948.
> # got: '404'
> # expected: '200'
>
> # Failed test 'TEST 5: hit routes - response_body - response is expected
(repeated req 0, req 0)'
> # at /usr/local/apisix/../test-nginx/lib/Test/Nginx/Socket.pm line 1589.
> # got: '{"error_msg":"404 Route Not Found"}
> # '
> # expected: 'hello world
> # '
>
> # Failed test 'TEST 6: hit routes - status code ok'
> # at /usr/local/apisix/../test-nginx/lib/Test/Nginx/Socket.pm line 948.
> # got: '404'
> # expected: '200'
>
> # Failed test 'TEST 6: hit routes - response_body - response is expected
(repeated req 0, req 0)'
> # at /usr/local/apisix/../test-nginx/lib/Test/Nginx/Socket.pm line 1589.
> # got: '{"error_msg":"404 Route Not Found"}
> # '
> # expected: 'hello world
> # '
> ```
>
> until I debugged at
>
>
https://github.com/apache/apisix/blob/9e3c34a0103b88d340285017e34021cbc1f0fde8/apisix/http/router/radixtree_uri.lua#L85
>
> when run test, the `user_routes.values` is nil, but when start apisix, it
work.
>
> after find this exception, something change, run the test case is back to
normal, and cannot be reproduced. >_<|||
If this magical event happened next, you may cc
@membphis @spacewander @tokers for help😊
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]