spacewander commented on a change in pull request #4574:
URL: https://github.com/apache/apisix/pull/4574#discussion_r667288162



##########
File path: t/admin/upstream3.t
##########
@@ -61,3 +61,35 @@ __DATA__
     }
 --- response_body
 
{"action":"get","count":0,"node":{"dir":true,"key":"/apisix/upstreams","nodes":{}}}
+
+
+
+=== TEST 2: retry_timeout is -1 (INVALID)
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+            local code, body = t('/apisix/admin/upstreams/a-b-c-ABC_0123',
+                ngx.HTTP_PUT,
+                [[{
+                    "nodes": {
+                        "127.0.0.1:8080": 1,
+                        "127.0.0.1:8090": 1
+                    },
+                    "retry_timeout": -1,
+                    "type": "roundrobin"
+                }]]
+            )
+            if code >= 300 then
+                ngx.status = code
+            end
+            ngx.print(body)
+        }
+    }
+--- request
+GET /t
+--- error_code: 400
+--- response_body
+{"error_msg":"invalid configuration: property \"retry_timeout\" validation 
failed: expected -1 to be greater than 0"}
+--- no_error_log

Review comment:
       The no_error_log already set in 
https://github.com/apache/apisix/blob/42ab6149272920bbab66985b90e2754a7c6cb747/t/admin/upstream3.t#L32




-- 
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