You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/05/31 03:19:16 UTC

[GitHub] [apisix] spacewander commented on a change in pull request #4340: feat: allow to set custom timeout for route

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



##########
File path: apisix/balancer.lua
##########
@@ -136,8 +136,18 @@ end
 -- set_balancer_opts will be called in balancer phase and before any tries
 local function set_balancer_opts(ctx)

Review comment:
       We can pass route directly:
   https://github.com/apache/apisix/blob/09e298302cbc8514d8240c300974746c9f85845c/apisix/balancer.lua#L247

##########
File path: apisix/schema_def.lua
##########
@@ -491,6 +491,15 @@ _M.route = {
             minItems = 1,
             uniqueItems = true,
         },
+        timeout = {

Review comment:
       Better to exact the `timeout` to a separate schema.

##########
File path: t/admin/routes2.t
##########
@@ -650,3 +650,40 @@ GET /t
 {"error_msg":"failed to fetch plugin config info by plugin config id [not_found], response code: 404"}
 --- no_error_log
 [error]
+
+
+
+=== TEST 18: valid route with timeout

Review comment:
       Need to add test to  t/node/timeout-upstream.t




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