We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd06e72 commit b18966eCopy full SHA for b18966e
t/sanity.t
@@ -827,3 +827,34 @@ a_dog: an animal
827
a_dog: an animal
828
--- no_error_log
829
[error]
830
+
831
832
833
+=== TEST 15: connection refused
834
+--- http_config eval: $::HttpConfig
835
+--- config
836
+ location /t {
837
+ content_by_lua '
838
+ local redis = require "resty.redis"
839
+ local red = redis:new()
840
841
+ red:set_timeout(10000) -- 10 sec
842
843
+ local ok, err = red:connect("127.0.0.1", 81)
844
+ if not ok then
845
+ ngx.say("failed to connect: ", err)
846
+ return
847
+ end
848
849
+ ngx.say("connected")
850
851
+ red:close()
852
+ ';
853
+ }
854
+--- request
855
+GET /t
856
+--- response_body
857
+failed to connect: connection refused
858
+--- timeout: 3
859
+--- no_error_log
860
+[alert]
0 commit comments