Extend protocol edge-case test suite.

pull/2345/merge
Roger A. Light 3 years ago
parent aa69b65d1b
commit 514f8dc89a

@ -736,9 +736,18 @@ int handle__connect(struct mosquitto *context)
if(protocol_version == PROTOCOL_VERSION_v5){
rc = property__read_all(CMD_CONNECT, &context->in_packet, &properties);
if(rc == MOSQ_ERR_DUPLICATE_PROPERTY || rc == MOSQ_ERR_PROTOCOL){
send__connack(context, 0, MQTT_RC_PROTOCOL_ERROR, NULL);
}else if(rc == MOSQ_ERR_MALFORMED_PACKET){
send__connack(context, 0, MQTT_RC_MALFORMED_PACKET, NULL);
}
if(rc) goto handle_connect_error;
}
property__process_connect(context, &properties);
rc = property__process_connect(context, &properties);
if(rc == MOSQ_ERR_PROTOCOL){
send__connack(context, 0, MQTT_RC_PROTOCOL_ERROR, NULL);
goto handle_connect_error;
}
if(will && will_qos > context->listener->max_qos){
if(protocol_version == mosq_p_mqtt5){
@ -748,11 +757,16 @@ int handle__connect(struct mosquitto *context)
goto handle_connect_error;
}
if(mosquitto_property_read_string(properties, MQTT_PROP_AUTHENTICATION_METHOD, &context->auth_method, false)){
mosquitto_property_read_binary(properties, MQTT_PROP_AUTHENTICATION_DATA, &auth_data, &auth_data_len, false);
mosquitto_property_read_string(properties, MQTT_PROP_AUTHENTICATION_METHOD, &context->auth_method, false);
mosquitto_property_read_binary(properties, MQTT_PROP_AUTHENTICATION_DATA, &auth_data, &auth_data_len, false);
mosquitto_property_free_all(&properties);
if(auth_data && !context->auth_method){
send__connack(context, 0, MQTT_RC_PROTOCOL_ERROR, NULL);
rc = MOSQ_ERR_PROTOCOL;
goto handle_connect_error;
}
mosquitto_property_free_all(&properties); /* FIXME - TEMPORARY UNTIL PROPERTIES PROCESSED */
if(packet__read_string(&context->in_packet, &client_id, &slen)){
rc = MOSQ_ERR_PROTOCOL;
@ -817,7 +831,16 @@ int handle__connect(struct mosquitto *context)
if(will){
rc = will__read(context, client_id, &will_struct, will_qos, will_retain);
if(rc) goto handle_connect_error;
if(rc){
if(context->protocol == mosq_p_mqtt5){
if(rc == MOSQ_ERR_DUPLICATE_PROPERTY || rc == MOSQ_ERR_PROTOCOL){
send__connack(context, 0, MQTT_RC_PROTOCOL_ERROR, NULL);
}else if(rc == MOSQ_ERR_MALFORMED_PACKET){
send__connack(context, 0, MQTT_RC_MALFORMED_PACKET, NULL);
}
}
goto handle_connect_error;
}
}else{
if(context->protocol == mosq_p_mqtt311 || context->protocol == mosq_p_mqtt5){
if(will_qos != 0 || will_retain != 0){
@ -868,6 +891,9 @@ int handle__connect(struct mosquitto *context)
if(context->in_packet.pos != context->in_packet.remaining_length){
/* Surplus data at end of packet, this must be an error. */
if(protocol_version == PROTOCOL_VERSION_v5){
send__connack(context, 0, MQTT_RC_MALFORMED_PACKET, NULL);
}
rc = MOSQ_ERR_PROTOCOL;
goto handle_connect_error;
}

@ -164,6 +164,11 @@ int handle__publish(struct mosquitto *context)
break;
case MQTT_PROP_SUBSCRIPTION_IDENTIFIER:
if(p->value.varint == 0){
mosquitto_property_free_all(&properties);
db__msg_store_free(msg);
return MOSQ_ERR_PROTOCOL;
}
p_prev = p;
p = p->next;
break;

@ -10,7 +10,7 @@ def do_test():
props = mqtt5_props.gen_uint32_prop(mqtt5_props.PROP_WILL_DELAY_INTERVAL, 3)
connect_packet = mosq_test.gen_connect("will-573191-test", proto_ver=5, will_topic="", will_properties=props)
connack_packet = b""
connack_packet = mosq_test.gen_connack(rc=mqtt5_rc.MQTT_RC_PROTOCOL_ERROR, proto_ver=5)
port = mosq_test.get_port()
broker = mosq_test.start_broker(filename=os.path.basename(__file__), port=port)

@ -14,6 +14,7 @@ def do_test(start_broker, proto_ver):
bmod[1] = bmod[1] - 2 # Reduce remaining length by two to remove final two payload length values
connect_packet = struct.pack("B"*len(bmod), *bmod)
connack_packet = mosq_test.gen_connack(mqtt5_rc.MQTT_RC_PROTOCOL_ERROR, proto_ver=5)
port = mosq_test.get_port()
broker = None
@ -21,7 +22,7 @@ def do_test(start_broker, proto_ver):
broker = mosq_test.start_broker(filename=os.path.basename(__file__), port=port)
try:
sock = mosq_test.do_client_connect(connect_packet, b"", port=port)
sock = mosq_test.do_client_connect(connect_packet, connack_packet, port=port)
sock.close()
except BrokenPipeError:
rc = 0

@ -8,13 +8,18 @@ def do_test(start_broker, proto_ver):
rc = 1
connect_packet = mosq_test.gen_connect("will-null-topic", will_topic="", will_payload=struct.pack("!4sB7s", b"will", 0, b"message"), proto_ver=proto_ver)
if proto_ver == 5:
connack_packet = mosq_test.gen_connack(rc=mqtt5_rc.MQTT_RC_PROTOCOL_ERROR, proto_ver=5)
else:
connack_packet = b""
port = mosq_test.get_port()
broker = None
if start_broker:
broker = mosq_test.start_broker(filename=os.path.basename(__file__), port=port)
try:
sock = mosq_test.do_client_connect(connect_packet, b"", timeout=30, port=port)
sock = mosq_test.do_client_connect(connect_packet, connack_packet, timeout=30, port=port)
sock.close()
except BrokenPipeError:
rc = 0

@ -199,188 +199,232 @@
]
},
{
"group": "v5.0 CONNACK PROPERTIES",
"group": "v5.0 CONNACK ALLOWED PROPERTIES",
"comment": "CMD RL FLAG RC PROPLEN PROPS",
"tests": [
{ "name": "20 with reason-string property", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 1F000170"},
{ "name": "20 with session-expiry-interval (four byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 08 00 00 05 1100000001"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with reason-string property missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 1F"},
{ "name": "20 with session-expiry-interval (four byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 11"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with user-property", "ver":5, "msgs": [
{"type":"send", "payload":"20 0A 00 00 07 26000170000171"},
{ "name": "20 with receive-maximum (two byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 06 00 00 03210101"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with user-property missing value", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 23000170"},
{ "name": "20 with receive-maximum (two byte integer) 0 value", "ver":5, "msgs": [
{"type":"send", "payload":"20 06 00 00 03 21 0000"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with user-property missing key,value", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 23"},
{ "name": "20 with receive-maximum (two byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 21"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with payload-format-indicator (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"20 05 00 00 02 0100"},
{ "name": "20 with maximum-qos (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"20 05 00 00 02 2400"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with request-problem-information (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"20 05 00 00 02 1700"},
{ "name": "20 with maximum-qos (byte) 2 value", "ver":5, "msgs": [
{"type":"send", "payload":"20 05 00 00 02 2402"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with maximum-qos (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"20 05 00 00 02 2400"},
{ "name": "20 with maximum-qos (byte) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 24"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with retain-available (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"20 05 00 00 02 2500"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with wildcard-subscription-available (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"20 05 00 00 02 2800"},
{ "name": "20 with retain-available (byte) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 25"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with subscription-identifier-available (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"20 05 00 00 02 2900"},
{ "name": "20 with maximum-packet-size (four byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 08 00 00 05 2700000001"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with shared-subscription-available (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"20 05 00 00 02 2A00"},
{ "name": "20 with maximum-packet-size (four byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 08 00 00 05 2700000001"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with payload-format-indicator (byte) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 01"},
{ "name": "20 with maximum-packet-size (four byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 27"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with request-problem-information (byte) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 17"},
{ "name": "20 with assigned-client-identifier (UTF-8 string)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 12000170"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with maximum-qos (byte) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 24"},
{ "name": "20 with assigned-client-identifier (UTF-8 string) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 12"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with retain-available (byte) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 25"},
{ "name": "20 with assigned-client-identifier (UTF-8 string) empty", "ver":5, "msgs": [
{"type":"send", "payload":"20 06 00 00 03 12 0000"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with topic-alias-maximum (two byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 06 00 00 03 220101"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with topic-alias-maximum (two byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 22"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with reason-string property", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 1F000170"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with reason-string property missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 1F"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with reason-string property empty", "ver":5, "msgs": [
{"type":"send", "payload":"20 06 00 00 03 1F 0000"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with wildcard-subscription-available (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"20 05 00 00 02 2800"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with wildcard-subscription-available (byte) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 28"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with subscription-identifier-available (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"20 05 00 00 02 2900"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with subscription-identifier-available (byte) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 29"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with server-keep-alive (two byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 06 00 00 03 130101"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with server-keep-alive (two byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 13"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with shared-subscription-available (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"20 05 00 00 02 2A00"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with shared-subscription-available (byte) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 2A"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with message-expiry-interval (four byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 08 00 00 05 0200000001"},
{ "name": "20 with response-information (UTF-8 string)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 1A000170"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with session-expiry-interval (four byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 08 00 00 05 1100000001"},
{ "name": "20 with response-information (UTF-8 string) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 1A"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with will-delay-interval (four byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 08 00 00 05 1800000001"},
{ "name": "20 with server-reference (UTF-8 string)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 1C000170"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with maximum-packet-size (four byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 08 00 00 05 2700000001"},
{ "name": "20 with server-reference (UTF-8 string) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 1C"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with message-expiry-interval (four byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 02"},
{ "name": "20 with authentication-method (UTF-8 string)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 15000170"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with session-expiry-interval (four byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 11"},
{ "name": "20 with authentication-method (UTF-8 string) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 15"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with will-delay-interval (four byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 18"},
{ "name": "20 with authentication-data (binary data)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 16000170"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with maximum-packet-size (four byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 27"},
{ "name": "20 with authentication-data (binary data) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 16"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with content-type (UTF-8 string)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 03000170"},
{ "name": "20 with user-property", "ver":5, "msgs": [
{"type":"send", "payload":"20 0A 00 00 07 26000170000171"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with response-topic (UTF-8 string)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 08000170"},
{ "name": "20 with user-property missing value", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 26000170"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with assigned-client-identifier (UTF-8 string)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 12000170"},
{ "name": "20 with user-property missing key,value", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 26"},
{"type":"recv", "payload":"E0 01 82"}
]}
]
},
{
"group": "v5.0 CONNACK DISALLOWED PROPERTIES",
"comment": "CMD RL FLAG RC PROPLEN PROPS",
"tests": [
{ "name": "20 with payload-format-indicator (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"20 05 00 00 02 0100"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with authentication-method (UTF-8 string)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 15000170"},
{ "name": "20 with request-problem-information (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"20 05 00 00 02 1700"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with response-information (UTF-8 string)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 1A000170"},
{ "name": "20 with payload-format-indicator (byte) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 01"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with server-reference (UTF-8 string)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 1C000170"},
{ "name": "20 with request-problem-information (byte) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 17"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with content-type (UTF-8 string) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 03"},
{ "name": "20 with message-expiry-interval (four byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 08 00 00 05 0200000001"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with response-topic (UTF-8 string) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 08"},
{ "name": "20 with will-delay-interval (four byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 08 00 00 05 1800000001"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with assigned-client-identifier (UTF-8 string) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 12"},
{ "name": "20 with message-expiry-interval (four byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 02"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with authentication-method (UTF-8 string) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 15"},
{ "name": "20 with will-delay-interval (four byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 18"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with response-information (UTF-8 string) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 1A"},
{ "name": "20 with content-type (UTF-8 string)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 03000170"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with server-reference (UTF-8 string) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 1C"},
{ "name": "20 with response-topic (UTF-8 string)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 08000170"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with correlation-data (binary data)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 09000170"},
{ "name": "20 with content-type (UTF-8 string) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 03"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with authentication-data (binary data)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 16000170"},
{ "name": "20 with response-topic (UTF-8 string) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 08"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with correlation-data (binary data) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 09"},
{ "name": "20 with correlation-data (binary data)", "ver":5, "msgs": [
{"type":"send", "payload":"20 07 00 00 04 09000170"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with authentication-data (binary data) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 16"},
{ "name": "20 with correlation-data (binary data) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 09"},
{"type":"recv", "payload":"E0 01 82"}
]},
@ -394,35 +438,11 @@
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with server-keep-alive (two byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 06 00 00 03 130101"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with receive-maximum (two byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 06 00 00 03210101"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with topic-alias-maximum (two byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 06 00 00 03 220101"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with topic-alias (two byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"20 06 00 00 03 230101"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with server-keep-alive (two byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 13"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with receive-maximum (two byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 21"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with topic-alias-maximum (two byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 22"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "20 with topic-alias (two byte integer) missing", "ver":5, "msgs": [
{"type":"send", "payload":"20 04 00 00 01 23"},
{"type":"recv", "payload":"E0 01 82"}

@ -19,11 +19,11 @@
{"type":"send", "payload":"10 0F 0006 4D5149736470 06 00 000A 0001 70", "comment":"CONNECT"},
{"type":"recv", "payload":"20 03 00 84 00", "comment": "CONNACK identifier rejected"}
]},
{ "name": "10 empty client ID", "ver":3, "connect":false, "msgs":[
{ "name": "10 empty client ID", "connect":false, "msgs":[
{"type":"send", "payload":"10 0E 0006 4D5149736470 03 02 000A 0000", "comment":"CONNECT clean session true, no client id"},
{"type":"recv", "payload":"20 02 00 02", "comment": "CONNACK"}
]},
{ "name": "10 ok", "ver":3, "connect":false, "expect_disconnect":false, "msgs":[
{ "name": "10 ok", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 0F 0006 4D5149736470 03 02 000A 0001 70", "comment":"CONNECT clean session true, no client id"},
{"type":"recv", "payload":"20 02 00 00", "comment": "CONNACK"}
]}
@ -164,7 +164,8 @@
{"type":"send", "payload":"10 12 0004 4D515454 05 02 000A 00 0005 746FEDBFBF"}
]},
{ "name": "10 [MQTT-3.1.2-16]", "connect":false, "msgs":[
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 00 0001 70 0001 70"}
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 00 0001 71 0001 71"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "10 [MQTT-3.1.2-17]", "connect":false, "msgs":[
{"type":"send", "payload":"10 0E 0004 4D515454 05 82 000A 00 0001 70"}
@ -191,11 +192,16 @@
{"type":"send", "payload":"10 15 0004 4D515454 05 82 000A 00 0001 70 0005 746FEDBFBF"}
]},
{ "name": "10 [MQTT-3.1.2-18]", "connect":false, "msgs":[
{"type":"send", "payload":"10 14 0004 4D515454 05 82 000A 00 0001 70 0001 70 0001 70"}
{"type":"send", "payload":"10 14 0004 4D515454 05 82 000A 00 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "10 [MQTT-3.1.2-19]", "connect":false, "msgs":[
{"type":"send", "payload":"10 11 0004 4D515454 05 C2 000A 00 0001 70 0001 70"}
]},
{ "name": "10 Will flag 1 ok", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 15 0004 4D515454 05 06 000A 00 0001 70 00 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "tiny max packet", "connect":false, "msgs":[{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 2700000002 0001 70"}]}
]
},
@ -207,5 +213,871 @@
{"type":"recv", "payload":"20 03 00 8C 00", "comment": "CONNACK Bad authentication method"}
]}
]
},
{
"group": "v5.0 CONNECT ALLOWED PROPERTIES",
"tests": [
{ "name": "session-expiry-interval (four byte integer)", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 11 00000001 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "2*session-expiry-interval (four byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 02 000A 0A 11 00000001 11 00000001 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "session-expiry-interval (four byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 11 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "receive-maximum (two byte integer)", "connect":false, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 03 21 0101 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "receive-maximum (two byte integer) 0 value", "connect":false, "msgs": [
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 03 21 0000 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "2*receive-maximum (two byte integer)", "connect":false, "msgs": [
{"type":"send", "payload":"10 14 0004 4D515454 05 02 000A 06 21 0101 21 0101 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "receive-maximum (two byte integer) missing", "connect":false, "msgs": [
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 21 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "maximum-packet-size (four byte integer)", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 27 10000001 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "2*maximum-packet-size (four byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 02 000A 0A 27 10000001 27 10000001 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "maximum-packet-size (four byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 27 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "maximum-packet-size (four byte integer) 0 value", "connect":false, "msgs":[
{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 27 00000000 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "maximum-packet-size (four byte integer) FFFFFFFF value", "expect_disconnect":false, "connect":false, "msgs":[
{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 27 FFFFFFFF 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "topic-alias-maximum (two byte integer)", "connect":false, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 03 22 0101 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "topic-alias-maximum (two byte integer) 0 value", "connect":false, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 03 22 0000 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "2*topic-alias-maximum (two byte integer)", "connect":false, "msgs": [
{"type":"send", "payload":"10 14 0004 4D515454 05 02 000A 06 22 0101 22 0101 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "topic-alias-maximum (two byte integer) missing", "connect":false, "msgs": [
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 22 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "request-response-information (byte)", "connect":false, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 19 01 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "2*request-response-information (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 12 0004 4D515454 05 02 000A 04 19 01 19 01 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "request-response-information (byte) missing", "connect":false, "msgs": [
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 19 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "request-response-information (byte) 2 value", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 19 02 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "request-problem-information (byte)", "connect":false, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 17 01 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "2*request-problem-information (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 12 0004 4D515454 05 02 000A 04 17 01 17 01 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "request-problem-information (byte) missing", "connect":false, "msgs": [
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 17 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "request-problem-information (byte) 2 value", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 17 02 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "user-property", "connect":false, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"10 15 0004 4D515454 05 02 000A 07 26 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "2*user-property", "connect":false, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"10 1C 0004 4D515454 05 02 000A 0E 26 0001 70 0001 70 26 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "user-property missing value", "connect":false, "msgs": [
{"type":"send", "payload":"10 12 0004 4D515454 05 02 000A 04 26 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "user-property missing key,value", "connect":false, "msgs": [
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 26 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "user-property empty key", "connect":false, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"10 14 0004 4D515454 05 02 000A 06 26 0000 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "user-property empty value", "connect":false, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"10 14 0004 4D515454 05 02 000A 06 26 0001 70 0000 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "user-property empty key,value", "connect":false, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 26 0000 0000 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "authentication-method (UTF-8 string) missing", "connect":false, "msgs": [
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 15 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*authentication-method (UTF-8 string)", "connect":false, "msgs": [
{"type":"send", "payload":"10 16 0004 4D515454 05 02 000A 08 15 0001 70 15 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "authentication-data (UTF-8 string) missing", "connect":false, "msgs": [
{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 15 0001 70 16 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "authentication-data (UTF-8 string) no authentication-method", "connect":false, "msgs": [
{"type":"send", "payload":"10 12 0004 4D515454 05 02 000A 04 16 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "2*authentication-data (UTF-8 string)", "connect":false, "msgs": [
{"type":"send", "payload":"10 1A 0004 4D515454 05 02 000A 0C 15 0001 70 16 0001 70 16 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]}
]
},
{
"group": "v5.0 CONNECT DISALLOWED PROPERTIES",
"tests": [
{ "name": "payload-format-indicator (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 01 01 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "payload-format-indicator (byte) missing", "connect":false, "msgs": [
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "maximum-qos (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 24 01 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "maximum-qos (byte) missing", "connect":false, "msgs": [
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 24 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "retain-available (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 25 01 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "retain-available (byte) missing", "connect":false, "msgs": [
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 25 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "wildcard-subscription-available (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 28 01 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "wildcard-subscription-available (byte) missing", "connect":false, "msgs": [
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 28 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "subscription-identifier-available (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 29 01 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "subscription-identifier-available (byte) missing", "connect":false, "msgs": [
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 29 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "shared-subscription-available (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 2A 01 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "shared-subscription-available (byte) missing", "connect":false, "msgs": [
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 2A 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "invalid-property 0x00 (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 00 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x04 (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 04 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x05 (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 05 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x06 (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 06 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x07 (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 07 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x0A (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 0A 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x0C (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 0C 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x0D (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 0D 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x0E (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 0E 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x0F (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 0F 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x10 (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 10 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x14 (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 14 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x1B (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 1B 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x1D (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 1D 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x1E (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 1E 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x20 (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 20 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x7F (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 7F 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "invalid-property 0x8000 (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 03 8000 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x8001 (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 03 8001 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0xFF7F (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 03 FF7F 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x808001 (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 12 0004 4D515454 05 02 000A 04 808001 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0xFFFF7F (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 12 0004 4D515454 05 02 000A 04 FFFF7F 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x80808001 (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 80808001 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0xFFFFFF7F (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 FFFFFF7F 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "unknown-property 0x8080808001 (byte)", "connect":false, "msgs": [
{"type":"send", "payload":"10 14 0004 4D515454 05 02 000A 06 8080808001 01 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "message-expiry-interval (four byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 02 10000001 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "2*message-expiry-interval (four byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 02 000A 0A 02 10000001 02 10000001 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "message-expiry-interval (four byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 02 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "message-expiry-interval (four byte integer) 0 value", "connect":false, "msgs":[
{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 02 00000000 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "message-expiry-interval (four byte integer) FFFFFFFF value", "connect":false, "msgs":[
{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 02 FFFFFFFF 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "will-delay-interval (four byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 18 10000001 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "2*will-delay-interval (four byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 02 000A 0A 18 10000001 18 10000001 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "will-delay-interval (four byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 18 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "will-delay-interval (four byte integer) 0 value", "connect":false, "msgs":[
{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 18 00000000 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "will-delay-interval (four byte integer) FFFFFFFF value", "connect":false, "msgs":[
{"type":"send", "payload":"10 13 0004 4D515454 05 02 000A 05 18 FFFFFFFF 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "server-keep-alive (two byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 03 13 0001 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "2*server-keep-alive (two byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 14 0004 4D515454 05 02 000A 06 13 0001 13 0001 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "server-keep-alive (two byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 13 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "topic-alias (two byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 03 23 0001 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "2*topic-alias (two byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 14 0004 4D515454 05 02 000A 06 23 0001 23 0001 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "topic-alias (two byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 23 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "content-type (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 12 0004 4D515454 05 02 000A 04 03 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "content-type (UTF-8 string) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 03 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "content-type (UTF-8 string) empty", "connect":false, "msgs":[
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 03 03 0000 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "response-topic (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 12 0004 4D515454 05 02 000A 04 08 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "response-topic (UTF-8 string) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 08 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "response-topic (UTF-8 string) empty", "connect":false, "msgs":[
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 03 08 0000 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "assigned-client-identifier (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 12 0004 4D515454 05 02 000A 04 12 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "assigned-client-identifier (UTF-8 string) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 12 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "assigned-client-identifier (UTF-8 string) empty", "connect":false, "msgs":[
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 03 12 0000 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "response-information (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 12 0004 4D515454 05 02 000A 04 1A 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "response-information (UTF-8 string) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 1A 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "response-information (UTF-8 string) empty", "connect":false, "msgs":[
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 03 1A 0000 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "correlation-data (binary)", "connect":false, "msgs":[
{"type":"send", "payload":"10 12 0004 4D515454 05 02 000A 04 09 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "correlation-data (binary) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 09 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "correlation-data (binary) empty", "connect":false, "msgs":[
{"type":"send", "payload":"10 11 0004 4D515454 05 02 000A 03 09 0000 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{"name": "subscription-identifier (variable byte integer)", "connect":false, "msgs": [
{"type":"send", "payload":"10 10 0004 4D515454 05 02 000A 02 0B 01 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{"name": "subscription-identifier (variable byte integer) missing", "connect":false, "msgs": [
{"type":"send", "payload":"10 0F 0004 4D515454 05 02 000A 01 0B 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]}
]
},
{
"group": "v5.0 WILL ALLOWED PROPERTIES",
"tests": [
{ "name": "payload-format-indicator (byte)", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 17 0004 4D515454 05 06 000A 00 0001 70 02 01 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "payload-format-indicator (byte) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*payload-format-indicator (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 01 01 01 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "message-expiry-interval (four byte integer)", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 1A 0004 4D515454 05 06 000A 00 0001 70 05 02 00000001 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "2*message-expiry-interval (four byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1F 0004 4D515454 05 06 000A 00 0001 70 0A 02 00000001 02 00000001 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "message-expiry-interval (four byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 02 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "will-delay-interval (four byte integer)", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 1A 0004 4D515454 05 06 000A 00 0001 70 05 18 00000001 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "will-delay-interval (four byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1F 0004 4D515454 05 06 000A 00 0001 70 0A 18 00000001 18 00000001 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "will-delay-interval (four byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 18 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "content-type (UTF-8 string)", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 03 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "2*content-type (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1D 0004 4D515454 05 06 000A 00 0001 70 08 03 0001 70 03 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "content-type (UTF-8 string) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 03 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "content-type (UTF-8 string) empty", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 06 000A 00 0001 70 03 03 0000 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "response-topic (UTF-8 string)", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 08 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "2*response-topic (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1D 0004 4D515454 05 06 000A 00 0001 70 08 08 0001 70 08 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "response-topic (UTF-8 string) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 08 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "response-topic (UTF-8 string) empty", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 06 000A 00 0001 70 03 08 0000 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "correlation-data (binary)", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 09 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "2*correlation-data (binary)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1D 0004 4D515454 05 06 000A 00 0001 70 08 09 0001 70 09 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "correlation-data (binary) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 09 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "correlation-data (binary) empty", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 06 000A 00 0001 70 03 09 0000 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "user-property", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 1C 0004 4D515454 05 06 000A 00 0001 70 07 26 0001 70 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "2*user-property", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 23 0004 4D515454 05 06 000A 00 0001 70 0E 26 0001 70 0001 70 26 0001 70 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "user-property missing value", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 26 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "user-property missing key,value", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 26 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "user-property empty key", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 1B 0004 4D515454 05 06 000A 00 0001 70 06 26 0000 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "user-property empty value", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 1B 0004 4D515454 05 06 000A 00 0001 70 06 26 0001 70 0000 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]},
{ "name": "user-property empty key,value", "connect":false, "expect_disconnect":false, "msgs":[
{"type":"send", "payload":"10 1A 0004 4D515454 05 06 000A 00 0001 70 05 26 0000 0000 0001 70 0001 70"},
{"type":"recv", "payload":"20 09 00 00 06 22000A 210014", "comment": "CONNACK"}
]}
]
},
{
"group": "v5.0 WILL DISALLOWED PROPERTIES",
"tests": [
{ "name": "request-problem-information (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 17 0004 4D515454 05 06 000A 00 0001 70 02 17 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "request-problem-information (byte) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 17 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*request-problem-information (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 17 01 17 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "request-response-information (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 17 0004 4D515454 05 06 000A 00 0001 70 02 19 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "request-response-information (byte) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 19 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*request-response-information (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 19 01 19 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "maximum-qos (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 17 0004 4D515454 05 06 000A 00 0001 70 02 24 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "maximum-qos (byte) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 24 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*maximum-qos (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 24 01 24 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "retain-available (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 17 0004 4D515454 05 06 000A 00 0001 70 02 25 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "retain-available (byte) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 25 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*retain-available (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 25 01 25 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "wildcard-subscription-available (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 17 0004 4D515454 05 06 000A 00 0001 70 02 28 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "wildcard-subscription-available (byte) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 28 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*wildcard-subscription-available (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 28 01 28 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "subscription-identifier-available (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 17 0004 4D515454 05 06 000A 00 0001 70 02 29 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "subscription-identifier-available (byte) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 29 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*subscription-identifier-available (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 29 01 29 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "shared-subscription-available (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 17 0004 4D515454 05 06 000A 00 0001 70 02 2A 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "shared-subscription-available (byte) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 2A 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*shared-subscription-available (byte)", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 2A 01 2A 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "server-keep-alive (two byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 06 000A 00 0001 70 03 13 0001 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "server-keep-alive (two byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 13 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*server-keep-alive (two byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1B 0004 4D515454 05 06 000A 00 0001 70 06 13 0001 13 0001 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "receive-maximum (two byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 06 000A 00 0001 70 03 21 0001 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "receive-maximum (two byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 21 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*receive-maximum (two byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1B 0004 4D515454 05 06 000A 00 0001 70 06 21 0001 21 0001 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "topic-alias-maximum (two byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 06 000A 00 0001 70 03 22 0001 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "topic-alias-maximum (two byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 22 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*topic-alias-maximum (two byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1B 0004 4D515454 05 06 000A 00 0001 70 06 22 0001 22 0001 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "topic-alias (two byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 06 000A 00 0001 70 03 23 0001 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "topic-alias (two byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 23 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*topic-alias (two byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1B 0004 4D515454 05 06 000A 00 0001 70 06 23 0001 23 0001 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "session-expiry-interval (four byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1A 0004 4D515454 05 06 000A 00 0001 70 05 11 00000001 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "session-expiry-interval (four byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 11 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*session-expiry-interval (four byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1F 0004 4D515454 05 06 000A 00 0001 70 0A 11 00000001 11 00000001 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "maximum-packet-size (four byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1A 0004 4D515454 05 06 000A 00 0001 70 05 27 00000001 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "maximum-packet-size (four byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 27 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "2*maximum-packet-size (four byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1F 0004 4D515454 05 06 000A 00 0001 70 0A 27 00000001 27 00000001 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "assigned-client-identifier (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 12 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "2*assigned-client-identifier (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1D 0004 4D515454 05 06 000A 00 0001 70 08 12 0001 70 12 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "assigned-client-identifier (UTF-8 string) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 12 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "assigned-client-identifier (UTF-8 string) empty", "connect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 06 000A 00 0001 70 03 12 0000 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "authentication-method (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 15 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "2*authentication-method (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1D 0004 4D515454 05 06 000A 00 0001 70 08 15 0001 70 15 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "authentication-method (UTF-8 string) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 15 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "authentication-method (UTF-8 string) empty", "connect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 06 000A 00 0001 70 03 15 0000 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "response-information (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 1A 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "2*response-information (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1D 0004 4D515454 05 06 000A 00 0001 70 08 1A 0001 70 1A 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "response-information (UTF-8 string) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 1A 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "response-information (UTF-8 string) empty", "connect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 06 000A 00 0001 70 03 1A 0000 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "server-reference (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 1C 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "2*server-reference (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1D 0004 4D515454 05 06 000A 00 0001 70 08 1C 0001 70 1C 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "server-reference (UTF-8 string) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 1C 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "server-reference (UTF-8 string) empty", "connect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 06 000A 00 0001 70 03 1C 0000 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "reason-string (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 1F 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "2*reason-string (UTF-8 string)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1D 0004 4D515454 05 06 000A 00 0001 70 08 1F 0001 70 1F 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "reason-string (UTF-8 string) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 1F 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "reason-string (UTF-8 string) empty", "connect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 06 000A 00 0001 70 03 1F 0000 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "authentication-data (binary)", "connect":false, "msgs":[
{"type":"send", "payload":"10 19 0004 4D515454 05 06 000A 00 0001 70 04 16 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "2*authentication-data (binary)", "connect":false, "msgs":[
{"type":"send", "payload":"10 1D 0004 4D515454 05 06 000A 00 0001 70 08 16 0001 70 16 0001 70 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "authentication-data (binary) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 16 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]},
{ "name": "authentication-data (binary) empty", "connect":false, "msgs":[
{"type":"send", "payload":"10 18 0004 4D515454 05 06 000A 00 0001 70 03 16 0000 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "subscription-identifier (variable byte integer)", "connect":false, "msgs":[
{"type":"send", "payload":"10 17 0004 4D515454 05 06 000A 00 0001 70 02 0B 01 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 82 00"}
]},
{ "name": "subscription-identifier (variable byte integer) missing", "connect":false, "msgs":[
{"type":"send", "payload":"10 16 0004 4D515454 05 06 000A 00 0001 70 01 0B 0001 70 0001 70"},
{"type":"recv", "payload":"20 03 00 81 00"}
]}
]
}
]

@ -110,15 +110,27 @@
{"type":"send", "payload":"E0 03 00 01 1F"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "E0 with reason-string property empty", "ver":5, "msgs": [
{"type":"send", "payload":"E0 05 00 03 1F 0000"}
]},
{ "name": "E0 with user-property", "ver":5, "msgs": [{"type":"send", "payload":"E0 09 00 07 26000170000171"}]},
{ "name": "E0 with user-property missing value", "ver":5, "msgs": [
{"type":"send", "payload":"E0 06 00 04 23000170"},
{"type":"send", "payload":"E0 06 00 04 26000170"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "E0 with user-property missing key,value", "ver":5, "msgs": [
{"type":"send", "payload":"E0 03 00 01 23"},
{"type":"send", "payload":"E0 03 00 01 26"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "E0 with user-property empty key", "ver":5, "msgs": [
{"type":"send", "payload":"E0 08 00 06 26 0000 0001 70"}
]},
{ "name": "E0 with user-property empty key,value", "ver":5, "msgs": [
{"type":"send", "payload":"E0 08 00 06 26 0001 70 0000"}
]},
{ "name": "E0 with user-property empty key,value", "ver":5, "msgs": [
{"type":"send", "payload":"E0 07 00 05 26 0000 0000"}
]},
{ "name": "E0 with session-expiry-interval (four byte integer)", "ver":5, "msgs": [{"type":"send", "payload":"E0 07 00 05 1100000000"}]},
{ "name": "E0 with 2*session-expiry-interval (four byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"E0 0C 00 0A 1100000000 1100000000"},
@ -136,6 +148,9 @@
{ "name": "E0 with server-reference (UTF-8 string) missing", "ver":5, "msgs": [
{"type":"send", "payload":"E0 03 00 01 1C"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "E0 with server-reference (UTF-8 string) empty", "ver":5, "msgs": [
{"type":"send", "payload":"E0 05 00 03 1C 0000"}
]}
]
},

@ -78,15 +78,31 @@
{"type":"send", "payload":"40 05 0001 00 01 1F"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "40 with reason-string property incomplete string", "ver":5, "msgs": [
{"type":"send", "payload":"40 06 0001 00 02 1F 00"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "40 with reason-string property empty string", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"40 07 0001 00 03 1F 0000"}
]},
{ "name": "40 with user-property", "ver":5, "expect_disconnect":false, "msgs": [{"type":"send", "payload":"40 0B 0001 00 07 26000170000171"}]},
{ "name": "40 with 2*user-property", "ver":5, "expect_disconnect":false, "msgs": [{"type":"send", "payload":"40 12 0001 00 0E 26000170000171 26000170000171"}]},
{ "name": "40 with user-property missing value", "ver":5, "msgs": [
{"type":"send", "payload":"40 08 0001 00 04 23000170"},
{"type":"send", "payload":"40 08 0001 00 04 26000170"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "40 with user-property missing key,value", "ver":5, "msgs": [
{"type":"send", "payload":"40 05 0001 00 01 23"},
{"type":"send", "payload":"40 05 0001 00 01 26"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "40 with user-property empty key", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"40 0A 0001 00 06 26 0000 0001 70"}
]},
{ "name": "40 with user-property empty value", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"40 0A 0001 00 06 26 0001 70 0000"}
]},
{ "name": "40 with user-property empty key,value", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"40 09 0001 00 05 26 0000 0000"}
]}
]
},

@ -112,15 +112,27 @@
{"type":"send", "payload":"70 05 0001 00 01 1F"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "70 with reason-string property empty", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"70 07 0001 00 03 1F 0000"}
]},
{ "name": "70 with user-property", "ver":5, "expect_disconnect":false, "msgs": [{"type":"send", "payload":"70 0B 0001 00 07 26000170000171"}]},
{ "name": "70 with 2*user-property", "ver":5, "expect_disconnect":false, "msgs": [{"type":"send", "payload":"70 12 0001 00 0E 26000170000171 26000170000171"}]},
{ "name": "70 with user-property missing value", "ver":5, "msgs": [
{"type":"send", "payload":"70 08 0001 00 04 23000170"},
{"type":"send", "payload":"70 08 0001 00 04 26000170"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "70 with user-property missing key,value", "ver":5, "msgs": [
{"type":"send", "payload":"70 05 0001 00 01 23"},
{"type":"send", "payload":"70 05 0001 00 01 26"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "70 with user-property empty key", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"70 0A 0001 00 06 26 0000 0001 70"}
]},
{ "name": "70 with user-property empty value", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"70 0A 0001 00 06 26 0001 70 0000"}
]},
{ "name": "70 with user-property empty key,value", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"70 09 0001 00 05 26 0000 0000"}
]}
]
},

@ -148,6 +148,7 @@
{"type":"send", "payload":"30 0F 0005 746F706963 00 7061796C6F6164", "comment":"PUBLISH with size < 20"},
{"type":"recv", "payload":"30 0F 0005 746F706963 00 7061796C6F6164", "comment":"PUBLISH with size < 20, returned"}
]},
{ "name": "payload-format-indicator=0 (byte)", "expect_disconnect":false, "ver":5, "msgs": [
{"type":"send", "payload":"32 13 0005 746F706963 1234 02 0100 7061796C6F6164"},
{"type":"recv", "payload":"40 03 1234 10"}
@ -168,6 +169,7 @@
{"type":"send", "payload":"32 12 0005 746F706963 1234 01 01 7061796C6F6164"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "message-expiry-interval=0 (four byte integer)", "expect_disconnect":false, "ver":5, "msgs": [
{"type":"send", "payload":"32 16 0005 746F706963 1234 05 0200000000 7061796C6F6164"},
{"type":"recv", "payload":"40 03 1234 10"}
@ -176,7 +178,6 @@
{"type":"send", "payload":"32 16 0005 746F706963 1234 05 0200000001 7061796C6F6164"},
{"type":"recv", "payload":"40 03 1234 10"}
]},
{ "name": "2*message-expiry-interval=1 (four byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"32 1A 0005 746F706963 1234 0A 0200000001 0200000001 7061796C6F6164"},
{"type":"recv", "payload":"E0 01 82"}
@ -219,6 +220,10 @@
{"type":"send", "payload":"32 12 0005 746F706963 1234 01 08 7061796C6F6164"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "response-topic (UTF-8 string) empty", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"32 14 0005 746F706963 1234 03 080000 7061796C6F6164"},
{"type":"recv", "payload":"40 03 1234 10"}
]},
{ "name": "correlation-data (binary data)", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"32 15 0005 746F706963 1234 04 09000170 7061796C6F6164"},
@ -232,6 +237,10 @@
{"type":"send", "payload":"32 12 0005 746F706963 1234 01 09 7061796C6F6164"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "correlation-data (binary data) empty", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"32 14 0005 746F706963 1234 03 090000 7061796C6F6164"},
{"type":"recv", "payload":"40 03 1234 10"}
]},
{ "name": "user-property", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"32 18 0005 746F706963 1234 07 26000170000171 7061796C6F6164"},
@ -249,11 +258,23 @@
{"type":"send", "payload":"32 12 0005 746F706963 1234 01 26 7061796C6F6164"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "subscription-identifier=1 (variable byte integer)", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"32 13 0005 746F706963 1234 02 0B01 7061796C6F6164"},
{ "name": "user-property empty key", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"32 17 0005 746F706963 1234 06 26 0000 0001 70 7061796C6F6164"},
{"type":"recv", "payload":"40 03 1234 10"}
]},
{ "name": "user-property empty value", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"32 17 0005 746F706963 1234 06 26 0001 70 0000 7061796C6F6164"},
{"type":"recv", "payload":"40 03 1234 10"}
]},
{ "name": "user-property empty key,value", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"32 16 0005 746F706963 1234 05 26 0000 0000 7061796C6F6164"},
{"type":"recv", "payload":"40 03 1234 10"}
]},
{ "name": "subscription-identifier=0 (variable byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"32 13 0005 746F706963 1234 02 0B00 7061796C6F6164"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "subscription-identifier=0x7F (variable byte integer)", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"32 13 0005 746F706963 1234 02 0B7F 7061796C6F6164"},
{"type":"recv", "payload":"40 03 1234 10"}
@ -311,6 +332,10 @@
{ "name": "content-type (UTF-8 string) missing", "ver":5, "msgs": [
{"type":"send", "payload":"32 12 0005 746F706963 1234 01 03 7061796C6F6164"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "content-type (UTF-8 string) empty", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"32 14 0005 746F706963 1234 03 030000 7061796C6F6164"},
{"type":"recv", "payload":"40 03 1234 10"}
]}
]
},

@ -93,6 +93,10 @@
{"type":"send", "payload":"50 05 0001 00 01 1F"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "50 with reason-string property empty", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"50 07 0001 00 03 1F 0000"},
{"type":"recv", "payload":"62 02 0001"}
]},
{ "name": "50 with user-property", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"50 0B 0001 00 07 26000170000171"},
{"type":"recv", "payload":"62 02 0001"}
@ -102,12 +106,24 @@
{"type":"recv", "payload":"62 02 0001"}
]},
{ "name": "50 with user-property missing value", "ver":5, "msgs": [
{"type":"send", "payload":"50 08 0001 00 04 23000170"},
{"type":"send", "payload":"50 08 0001 00 04 26000170"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "50 with user-property missing key,value", "ver":5, "msgs": [
{"type":"send", "payload":"50 05 0001 00 01 23"},
{"type":"send", "payload":"50 05 0001 00 01 26"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "50 with user-property empty key", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"50 0A 0001 00 06 26 0000 0001 70"},
{"type":"recv", "payload":"62 02 0001"}
]},
{ "name": "50 with user-property empty value", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"50 0A 0001 00 06 26 0001 70 0000"},
{"type":"recv", "payload":"62 02 0001"}
]},
{ "name": "50 with user-property empty key,value", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"50 09 0001 00 05 26 0000 0000"},
{"type":"recv", "payload":"62 02 0001"}
]}
]
},

@ -99,6 +99,10 @@
{"type":"send", "payload":"62 05 0001 00 01 1F"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "62 with reason-string property empty", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"62 07 0001 00 03 1F 0000"},
{"type":"recv", "payload":"70 02 0001"}
]},
{ "name": "62 with user-property", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"62 0B 0001 00 07 26000170000171"},
@ -109,12 +113,24 @@
{"type":"recv", "payload":"70 02 0001"}
]},
{ "name": "62 with user-property missing value", "ver":5, "msgs": [
{"type":"send", "payload":"62 08 0001 00 04 23000170"},
{"type":"send", "payload":"62 08 0001 00 04 26000170"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "62 with user-property missing key,value", "ver":5, "msgs": [
{"type":"send", "payload":"62 05 0001 00 01 23"},
{"type":"send", "payload":"62 05 0001 00 01 26"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "62 with user-property empty key", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"62 0A 0001 00 06 26 0000 0001 70"},
{"type":"recv", "payload":"70 02 0001"}
]},
{ "name": "62 with user-property empty value", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"62 0A 0001 00 06 26 0001 70 0000"},
{"type":"recv", "payload":"70 02 0001"}
]},
{ "name": "62 with user-property empty key,value", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"62 09 0001 00 05 26 0000 0000"},
{"type":"recv", "payload":"70 02 0001"}
]}
]
},

@ -117,7 +117,7 @@
]
},
{
"group": "v5.0 SUBACK PROPERTIES",
"group": "v5.0 SUBACK ALLOWED PROPERTIES",
"tests": [
{ "name": "90 with reason-string property", "ver":5, "msgs": [
{"type":"send", "payload":"90 08 0001 04 1F000170 00"},
@ -137,14 +137,30 @@
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "90 with user-property missing value", "ver":5, "msgs": [
{"type":"send", "payload":"90 08 0001 04 23000170 00"},
{"type":"send", "payload":"90 08 0001 04 26000170 00"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "90 with user-property missing key,value", "ver":5, "msgs": [
{"type":"send", "payload":"90 05 0001 01 23 00"},
{"type":"send", "payload":"90 05 0001 01 26 00"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "90 with user-property empty key", "ver":5, "msgs": [
{"type":"send", "payload":"90 0A 0001 06 26 0000 0001 70 00"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "90 with user-property empty value", "ver":5, "msgs": [
{"type":"send", "payload":"90 0A 0001 06 26 0001 70 0000 00"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "90 with user-property empty key,value", "ver":5, "msgs": [
{"type":"send", "payload":"90 09 0001 05 26 0000 0000 00"},
{"type":"recv", "payload":"E0 01 82"}
]}
]
},
{
"group": "v5.0 SUBACK DISALLOWED PROPERTIES",
"tests": [
{ "name": "90 with payload-format-indicator (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"90 06 0001 02 0100 00"},
{"type":"recv", "payload":"E0 01 82"}

@ -224,7 +224,31 @@
{"type":"send", "payload":"82 15 0001 0E 26000170000171 26000170000171 0001 70 00"},
{"type":"recv", "payload":"90 04 0001 00 00"}
]},
{ "name": "82 with user-property missing value", "ver":5, "msgs": [
{"type":"send", "payload":"82 0B 0001 04 26000170 0001 70 00"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "82 with user-property missing key,value", "ver":5, "msgs": [
{"type":"send", "payload":"82 08 0001 01 26 0001 70 00"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "82 with user-property empty key", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"82 0D 0001 06 26 0000 0001 70 0001 70 00"},
{"type":"recv", "payload":"90 04 0001 00 00"}
]},
{ "name": "82 with user-property empty value", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"82 0D 0001 06 26 0001 70 0000 0001 70 00"},
{"type":"recv", "payload":"90 04 0001 00 00"}
]},
{ "name": "82 with user-property empty key,value", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"82 0C 0001 05 26 0000 0000 0001 70 00"},
{"type":"recv", "payload":"90 04 0001 00 00"}
]},
{ "name": "82 with subscription-identifier missing (variable byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"82 08 0001 01 0B 0001 70 00"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "82 with subscription-identifier=0 (variable byte integer)", "ver":5, "msgs": [
{"type":"send", "payload":"82 09 0001 02 0B00 0001 70 00"},
{"type":"recv", "payload":"E0 01 81"}

@ -88,7 +88,7 @@
]
},
{
"group": "v5.0 UNSUBACK PROPERTIES",
"group": "v5.0 UNSUBACK ALLOWED PROPERTIES",
"tests": [
{ "name": "B0 with reason-string property", "ver":5, "msgs": [
{"type":"send", "payload":"B0 08 0001 04 1F000170 00"},
@ -104,14 +104,30 @@
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "B0 with user-property missing value", "ver":5, "msgs": [
{"type":"send", "payload":"B0 08 0001 04 23000170 00"},
{"type":"send", "payload":"B0 08 0001 04 26000170 00"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "B0 with user-property missing key,value", "ver":5, "msgs": [
{"type":"send", "payload":"B0 05 0001 01 23 00"},
{"type":"send", "payload":"B0 05 0001 01 26 00"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "B0 with user-property empty key", "ver":5, "msgs": [
{"type":"send", "payload":"B0 0A 0001 06 26 0000 0001 70 00"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "B0 with user-property empty value", "ver":5, "msgs": [
{"type":"send", "payload":"B0 0A 0001 06 26 0001 70 0000 00"},
{"type":"recv", "payload":"E0 01 82"}
]},
{ "name": "B0 with user-property empty key,value", "ver":5, "msgs": [
{"type":"send", "payload":"B0 09 0001 05 26 0000 0000 00"},
{"type":"recv", "payload":"E0 01 82"}
]}
]
},
{
"group": "v5.0 UNSUBACK DISALLOWED PROPERTIES",
"tests": [
{ "name": "B0 with payload-format-indicator (byte)", "ver":5, "msgs": [
{"type":"send", "payload":"B0 06 0001 02 0100 00"},
{"type":"recv", "payload":"E0 01 82"}

@ -148,6 +148,26 @@
{ "name": "A2 with 2*user-property", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"A2 14 0001 0E 26000170000171 26000170000171 0001 70"},
{"type":"recv", "payload":"B0 04 0001 00 11"}
]},
{ "name": "A2 with user-property missing value", "ver":5, "msgs": [
{"type":"send", "payload":"A2 0A 0001 04 26000170 0001 70"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "A2 with user-property missing key,value", "ver":5, "msgs": [
{"type":"send", "payload":"A2 07 0001 01 26 0001 70"},
{"type":"recv", "payload":"E0 01 81"}
]},
{ "name": "A2 with user-property empty key", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"A2 0C 0001 06 26 0000 0001 70 0001 70"},
{"type":"recv", "payload":"B0 04 0001 00 11"}
]},
{ "name": "A2 with user-property empty value", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"A2 0C 0001 06 26 0001 70 0000 0001 70"},
{"type":"recv", "payload":"B0 04 0001 00 11"}
]},
{ "name": "A2 with user-property empty key,value", "ver":5, "expect_disconnect":false, "msgs": [
{"type":"send", "payload":"A2 0B 0001 05 26 0000 0000 0001 70"},
{"type":"recv", "payload":"B0 04 0001 00 11"}
]}
]
},

Loading…
Cancel
Save