chore(quic): clean test code
This commit is contained in:
parent
98a72d40ce
commit
de810e04fd
|
@ -23,7 +23,7 @@
|
||||||
-include_lib("quicer/include/quicer.hrl").
|
-include_lib("quicer/include/quicer.hrl").
|
||||||
-include_lib("emqx/include/emqx_quic.hrl").
|
-include_lib("emqx/include/emqx_quic.hrl").
|
||||||
|
|
||||||
-behavior(quicer_connection).
|
-behaviour(quicer_connection).
|
||||||
|
|
||||||
-export([
|
-export([
|
||||||
init/1,
|
init/1,
|
||||||
|
|
|
@ -14,7 +14,10 @@
|
||||||
%% limitations under the License.
|
%% limitations under the License.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
%% MQTT/QUIC control Stream
|
%% MQTT over QUIC
|
||||||
|
%% multistreams: This is the control stream.
|
||||||
|
%% single stream: This is the only main stream.
|
||||||
|
%% callbacks are from emqx_connection process rather than quicer_stream
|
||||||
-module(emqx_quic_stream).
|
-module(emqx_quic_stream).
|
||||||
|
|
||||||
-ifndef(BUILD_WITHOUT_QUIC).
|
-ifndef(BUILD_WITHOUT_QUIC).
|
||||||
|
@ -66,10 +69,9 @@
|
||||||
_ => _
|
_ => _
|
||||||
}.
|
}.
|
||||||
|
|
||||||
%% for accepting
|
%%% For Accepting New Remote Stream
|
||||||
-spec wait({pid(), connection_handle(), socket_info()}) ->
|
-spec wait({pid(), connection_handle(), socket_info()}) ->
|
||||||
{ok, socket()} | {error, enotconn}.
|
{ok, socket()} | {error, enotconn}.
|
||||||
%%% For Accepting New Remote Stream
|
|
||||||
wait({ConnOwner, Conn, ConnInfo}) ->
|
wait({ConnOwner, Conn, ConnInfo}) ->
|
||||||
{ok, Conn} = quicer:async_accept_stream(Conn, []),
|
{ok, Conn} = quicer:async_accept_stream(Conn, []),
|
||||||
ConnOwner ! {self(), stream_acceptor_ready},
|
ConnOwner ! {self(), stream_acceptor_ready},
|
||||||
|
|
|
@ -65,7 +65,6 @@ init_per_group(quic, Config) ->
|
||||||
UdpPort = 1884,
|
UdpPort = 1884,
|
||||||
emqx_common_test_helpers:start_apps([]),
|
emqx_common_test_helpers:start_apps([]),
|
||||||
emqx_common_test_helpers:ensure_quic_listener(?MODULE, UdpPort),
|
emqx_common_test_helpers:ensure_quic_listener(?MODULE, UdpPort),
|
||||||
emqx_logger:set_log_level(debug),
|
|
||||||
[{port, UdpPort}, {conn_fun, quic_connect} | Config];
|
[{port, UdpPort}, {conn_fun, quic_connect} | Config];
|
||||||
init_per_group(_, Config) ->
|
init_per_group(_, Config) ->
|
||||||
emqx_common_test_helpers:stop_apps([]),
|
emqx_common_test_helpers:stop_apps([]),
|
||||||
|
|
|
@ -141,16 +141,6 @@ init_per_suite(Config) ->
|
||||||
emqx_common_test_helpers:start_apps([]),
|
emqx_common_test_helpers:start_apps([]),
|
||||||
UdpPort = 14567,
|
UdpPort = 14567,
|
||||||
start_emqx_quic(UdpPort),
|
start_emqx_quic(UdpPort),
|
||||||
%% dbg:tracer(process, {fun dbg:dhandler/2, group_leader()}),
|
|
||||||
%% dbg:p(all, c),
|
|
||||||
%% dbg:tpl(quicer_stream, handle_info, c),
|
|
||||||
%% dbg:tp(emqx_quic_connection, cx),
|
|
||||||
%% dbg:tp(emqx_quic_stream, cx),
|
|
||||||
%% dbg:tp(emqtt, cx),
|
|
||||||
%% dbg:tpl(emqtt_quic_stream, cx),
|
|
||||||
%% dbg:tpl(emqx_quic_stream, cx),
|
|
||||||
%% dbg:tpl(emqx_quic_data_stream, cx),
|
|
||||||
%% dbg:tpl(emqtt, cx),
|
|
||||||
[{port, UdpPort}, {pub_qos, 0}, {sub_qos, 0} | Config].
|
[{port, UdpPort}, {pub_qos, 0}, {sub_qos, 0} | Config].
|
||||||
|
|
||||||
end_per_suite(_) ->
|
end_per_suite(_) ->
|
||||||
|
|
Loading…
Reference in New Issue