update frame suite and frame suite
This commit is contained in:
parent
dae81037bf
commit
84f241522f
8
Makefile
8
Makefile
|
@ -32,11 +32,13 @@ TEST_ERLC_OPTS += +'{parse_transform, lager_transform}'
|
|||
|
||||
EUNIT_OPTS = verbose
|
||||
|
||||
CT_SUITES = emqx_stats
|
||||
# CT_SUITES = emqx_stats
|
||||
## emqx_trie emqx_router emqx_frame emqx_mqtt_compat
|
||||
|
||||
#CT_SUITES = emqx emqx_broker emqx_mod emqx_lib emqx_topic emqx_mqueue emqx_inflight \
|
||||
# emqx_vm emqx_net emqx_protocol emqx_access emqx_router
|
||||
CT_SUITES = emqx emqx_access emqx_base62 emqx_broker emqx_client emqx_cm emqx_frame emqx_guid emqx_inflight \
|
||||
emqx_json emqx_keepalive emqx_lib emqx_metrics emqx_misc emqx_mod emqx_mqtt_caps \
|
||||
emqx_mqtt_compat emqx_mqtt_properties emqx_mqueue emqx_net emqx_pqueue emqx_router emqx_sm \
|
||||
emqx_stats emqx_tables emqx_time emqx_topic emqx_trie emqx_vm emqx_zone
|
||||
|
||||
CT_OPTS = -cover test/ct.cover.spec -erl_args -name emqxct@127.0.0.1
|
||||
|
||||
|
|
|
@ -329,15 +329,17 @@ serialize_parse_pubcomp_v5(_) ->
|
|||
serialize_parse_subscribe(_) ->
|
||||
%% SUBSCRIBE(Q1, R0, D0, PacketId=2, TopicTable=[{<<"TopicA">>,2}])
|
||||
Bin = <<130,11,0,2,0,6,84,111,112,105,99,65,2>>,
|
||||
TopicFilters = [{<<"TopicA">>, #{qos => 2}}],
|
||||
TopicOpts = #{ nl => 0 , rap => 0, rc => 0,
|
||||
rh => 0, subid => 0 , qos => 2 },
|
||||
TopicFilters = [{<<"TopicA">>, TopicOpts}],
|
||||
Packet = ?SUBSCRIBE_PACKET(2, TopicFilters),
|
||||
?assertEqual(Bin, iolist_to_binary(serialize(Packet))),
|
||||
?assertEqual({ok, Packet, <<>>}, parse(Bin)).
|
||||
|
||||
serialize_parse_subscribe_v5(_) ->
|
||||
TopicFilters = [{<<"TopicQos0">>, #{rh => 1, qos => ?QOS_0}},
|
||||
{<<"TopicQos1">>, #{rh => 1, qos => ?QOS_1}}],
|
||||
Packet = ?SUBSCRIBE_PACKET(1, #{'Subscription-Identifier' => 16#FFFFFFF},
|
||||
TopicFilters = [{<<"TopicQos0">>, #{rh => 1, qos => ?QOS_2, rap => 0, nl => 0, rc => 0, subid => 0}},
|
||||
{<<"TopicQos1">>, #{rh => 1, qos => ?QOS_2, rap => 0, nl => 0, rc => 0, subid => 0}}],
|
||||
Packet = ?SUBSCRIBE_PACKET(3, #{'Subscription-Identifier' => 16#FFFFFFF},
|
||||
TopicFilters),
|
||||
?assertEqual({ok, Packet, <<>>},
|
||||
parse_serialize(Packet, #{version => ?MQTT_PROTO_V5})).
|
||||
|
|
|
@ -70,7 +70,7 @@ match_routes(_) ->
|
|||
?R:add_route(From, <<"a/+/c">>, node()),
|
||||
?R:add_route(From, <<"a/b/#">>, node()),
|
||||
?R:add_route(From, <<"#">>, node()),
|
||||
timer:sleep(6),
|
||||
timer:sleep(1000),
|
||||
?assertEqual([#route{topic = <<"#">>, dest = node()},
|
||||
#route{topic = <<"a/+/c">>, dest = node()},
|
||||
#route{topic = <<"a/b/#">>, dest = node()},
|
||||
|
|
Loading…
Reference in New Issue