fix: handle `infinity` timeout option in `ehttpc` (r5.0)
Fixes https://emqx.atlassian.net/browse/EMQX-9987
This commit is contained in:
parent
3fd2887921
commit
4565acc600
|
@ -631,6 +631,30 @@ t_publish_success(Config) ->
|
||||||
),
|
),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
|
t_publish_success_infinity_timeout(Config) ->
|
||||||
|
ServiceAccountJSON = ?config(service_account_json, Config),
|
||||||
|
Topic = <<"t/topic">>,
|
||||||
|
{ok, _} = create_bridge(Config, #{
|
||||||
|
<<"resource_opts">> => #{<<"request_timeout">> => <<"infinity">>}
|
||||||
|
}),
|
||||||
|
{ok, #{<<"id">> := RuleId}} = create_rule_and_action_http(Config),
|
||||||
|
on_exit(fun() -> ok = emqx_rule_engine:delete_rule(RuleId) end),
|
||||||
|
Payload = <<"payload">>,
|
||||||
|
Message = emqx_message:make(Topic, Payload),
|
||||||
|
emqx:publish(Message),
|
||||||
|
DecodedMessages = assert_http_request(ServiceAccountJSON),
|
||||||
|
?assertMatch(
|
||||||
|
[
|
||||||
|
#{
|
||||||
|
<<"topic">> := Topic,
|
||||||
|
<<"payload">> := Payload,
|
||||||
|
<<"metadata">> := #{<<"rule_id">> := RuleId}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
DecodedMessages
|
||||||
|
),
|
||||||
|
ok.
|
||||||
|
|
||||||
t_publish_success_local_topic(Config) ->
|
t_publish_success_local_topic(Config) ->
|
||||||
ResourceId = ?config(resource_id, Config),
|
ResourceId = ?config(resource_id, Config),
|
||||||
ServiceAccountJSON = ?config(service_account_json, Config),
|
ServiceAccountJSON = ?config(service_account_json, Config),
|
||||||
|
|
2
mix.exs
2
mix.exs
|
@ -49,7 +49,7 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
{:redbug, "2.0.8"},
|
{:redbug, "2.0.8"},
|
||||||
{:covertool, github: "zmstone/covertool", tag: "2.0.4.1", override: true},
|
{:covertool, github: "zmstone/covertool", tag: "2.0.4.1", override: true},
|
||||||
{:typerefl, github: "ieQu1/typerefl", tag: "0.9.1", override: true},
|
{:typerefl, github: "ieQu1/typerefl", tag: "0.9.1", override: true},
|
||||||
{:ehttpc, github: "emqx/ehttpc", tag: "0.4.8", override: true},
|
{:ehttpc, github: "emqx/ehttpc", tag: "0.4.10", override: true},
|
||||||
{:gproc, github: "emqx/gproc", tag: "0.9.0.1", override: true},
|
{:gproc, github: "emqx/gproc", tag: "0.9.0.1", override: true},
|
||||||
{:jiffy, github: "emqx/jiffy", tag: "1.0.5", override: true},
|
{:jiffy, github: "emqx/jiffy", tag: "1.0.5", override: true},
|
||||||
{:cowboy, github: "emqx/cowboy", tag: "2.9.0", override: true},
|
{:cowboy, github: "emqx/cowboy", tag: "2.9.0", override: true},
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
, {gpb, "4.19.7"}
|
, {gpb, "4.19.7"}
|
||||||
, {typerefl, {git, "https://github.com/ieQu1/typerefl", {tag, "0.9.1"}}}
|
, {typerefl, {git, "https://github.com/ieQu1/typerefl", {tag, "0.9.1"}}}
|
||||||
, {gun, {git, "https://github.com/emqx/gun", {tag, "1.3.9"}}}
|
, {gun, {git, "https://github.com/emqx/gun", {tag, "1.3.9"}}}
|
||||||
, {ehttpc, {git, "https://github.com/emqx/ehttpc", {tag, "0.4.8"}}}
|
, {ehttpc, {git, "https://github.com/emqx/ehttpc", {tag, "0.4.10"}}}
|
||||||
, {gproc, {git, "https://github.com/emqx/gproc", {tag, "0.9.0.1"}}}
|
, {gproc, {git, "https://github.com/emqx/gproc", {tag, "0.9.0.1"}}}
|
||||||
, {jiffy, {git, "https://github.com/emqx/jiffy", {tag, "1.0.5"}}}
|
, {jiffy, {git, "https://github.com/emqx/jiffy", {tag, "1.0.5"}}}
|
||||||
, {cowboy, {git, "https://github.com/emqx/cowboy", {tag, "2.9.0"}}}
|
, {cowboy, {git, "https://github.com/emqx/cowboy", {tag, "2.9.0"}}}
|
||||||
|
|
Loading…
Reference in New Issue