Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: route_with_limit_plugin_test (E2E) may fail #954

Closed
idbeta opened this issue Dec 2, 2020 · 2 comments
Closed

test: route_with_limit_plugin_test (E2E) may fail #954

idbeta opened this issue Dec 2, 2020 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed testcase
Milestone

Comments

@idbeta
Copy link
Contributor

idbeta commented Dec 2, 2020

Bug report

when I execute tests in my local environment,somtimes may fail.

How to Reproduce

=== RUN   TestRoute_With_Limit_Plugin_By_Consumer
    printer.go:54: GET http://127.0.0.1:9080/hello
    printer.go:54: PUT http://127.0.0.1:9000/apisix/admin/routes/r1
    printer.go:54: GET http://127.0.0.1:9000/apisix/admin/consumers/jack
    printer.go:54: PUT http://127.0.0.1:9000/apisix/admin/consumers
    printer.go:54: PUT http://127.0.0.1:9000/apisix/admin/consumers
    printer.go:54: GET http://127.0.0.1:9080/hello
    printer.go:54: GET http://127.0.0.1:9080/hello
    printer.go:54: GET http://127.0.0.1:9080/hello
    reporter.go:23:
        	Error Trace:	reporter.go:23
        	            				chain.go:21
        	            				response.go:585
        	            				response.go:151
        	            				base.go:184
        	            				route_with_limit_plugin_test.go:302
        	Error:
        	            	expected status equal to:
        	            	 "503 Service Unavailable"

        	            	but got:
        	            	 "200 OK"
        	Test:       	TestRoute_With_Limit_Plugin_By_Consumer

Additional context

"limit-count": {
     "count": 2,
     "time_window": 2,
     "key": "consumer_name"
}

In this case, the time_window of the limit-count is 2, it should be set larger so that it can avoid the failure.

@idbeta idbeta added the bug Something isn't working label Dec 2, 2020
@membphis
Copy link
Member

membphis commented Dec 2, 2020

"time_window": 2, to "time_window": 60,, should be enough

@membphis membphis added this to the 2.2 milestone Dec 2, 2020
@membphis membphis added the help wanted Extra attention is needed label Dec 7, 2020
@nic-chen
Copy link
Member

we don't have this fail now, should have be fixed by #976

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed testcase
Projects
None yet
Development

No branches or pull requests

3 participants