wfgydbu commented on a change in pull request #3401:
URL: https://github.com/apache/apisix/pull/3401#discussion_r563416313



##########
File path: t/admin/upstream2.t
##########
@@ -253,3 +253,36 @@ GET /index.html
 --- error_code: 502
 --- error_log
 no valid upstream node
+
+
+
+=== TEST 9: upstream timeouts equal to zero
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+            local code, body = t('/apisix/admin/upstreams/1',
+                 ngx.HTTP_PUT,
+                 [[{
+                    "nodes": {
+                        "127.0.0.1:8080": 1
+                    },
+                    "type": "roundrobin",
+                    "timeout": {
+                        "connect": 0,
+                        "send": 0,
+                        "read": 0
+                    }
+                }]]
+                )
+            ngx.status = code
+            ngx.print(body)
+        }
+    }
+--- request
+GET /t
+--- error_code: 400
+--- response_body
+{"error_msg":"invalid configuration: property \"timeout\" validation failed: 
property \"send\" validation failed: expected 0 to be sctrictly greater than 0"}

Review comment:
       Sure, I will fix it asap.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to