Procházet zdrojové kódy

chore(quic): clean test code

William Yang před 3 roky
rodič
revize
de810e04fd

+ 1 - 1
apps/emqx/src/emqx_quic_connection.erl

@@ -23,7 +23,7 @@
 -include_lib("quicer/include/quicer.hrl").
 -include_lib("emqx/include/emqx_quic.hrl").
 
--behavior(quicer_connection).
+-behaviour(quicer_connection).
 
 -export([
     init/1,

+ 5 - 3
apps/emqx/src/emqx_quic_stream.erl

@@ -14,7 +14,10 @@
 %% 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).
 
 -ifndef(BUILD_WITHOUT_QUIC).
@@ -66,10 +69,9 @@
     _ => _
 }.
 
-%% for accepting
+%%% For Accepting New Remote Stream
 -spec wait({pid(), connection_handle(), socket_info()}) ->
     {ok, socket()} | {error, enotconn}.
-%%% For Accepting New Remote Stream
 wait({ConnOwner, Conn, ConnInfo}) ->
     {ok, Conn} = quicer:async_accept_stream(Conn, []),
     ConnOwner ! {self(), stream_acceptor_ready},

+ 0 - 1
apps/emqx/test/emqx_mqtt_protocol_v5_SUITE.erl

@@ -65,7 +65,6 @@ init_per_group(quic, Config) ->
     UdpPort = 1884,
     emqx_common_test_helpers:start_apps([]),
     emqx_common_test_helpers:ensure_quic_listener(?MODULE, UdpPort),
-    emqx_logger:set_log_level(debug),
     [{port, UdpPort}, {conn_fun, quic_connect} | Config];
 init_per_group(_, Config) ->
     emqx_common_test_helpers:stop_apps([]),

+ 0 - 10
apps/emqx/test/emqx_quic_multistreams_SUITE.erl

@@ -141,16 +141,6 @@ init_per_suite(Config) ->
     emqx_common_test_helpers:start_apps([]),
     UdpPort = 14567,
     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].
 
 end_per_suite(_) ->