Skip to content

Commit 7baf397

Browse files
committed
Rename 'utf8_string' type in MQTT packet_prop_SUITE
`proper-testing/proper` recently added `proper_unicode:utf8_string` which is automatically imported and conflicts with this custom generator.
1 parent e01ab9b commit 7baf397

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

deps/rabbitmq_mqtt/test/packet_prop_SUITE.erl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ publish_packet() ->
103103
retain = boolean()},
104104
variable = #mqtt_packet_publish{
105105
packet_id = packet_id(Qos),
106-
topic_name = utf8_string()},
106+
topic_name = mqtt_utf8_string()},
107107
payload = binary()}).
108108

109109
publish_with_properties_packet() ->
@@ -135,23 +135,23 @@ publish_properties() ->
135135
list(elements([{'Payload-Format-Indicator', bit()},
136136
{'Message-Expiry-Interval', four_byte_integer()},
137137
{'Topic-Alias', two_byte_integer()},
138-
{'Response-Topic', utf8_string()},
138+
{'Response-Topic', mqtt_utf8_string()},
139139
{'Correlation-Data', binary_data()},
140140
user_property(),
141-
{'Content-Type', utf8_string()}])),
141+
{'Content-Type', mqtt_utf8_string()}])),
142142
maps:from_list(L)).
143143

144144
puback_properties() ->
145145
?LET(L,
146-
list(elements([{'Reason-String', utf8_string()},
146+
list(elements([{'Reason-String', mqtt_utf8_string()},
147147
user_property()
148148
])),
149149
maps:from_list(L)).
150150

151151
disconnect_properties() ->
152152
?LET(L,
153153
list(elements([{'Session-Expiry-Interval', four_byte_integer()},
154-
{'Reason-String', utf8_string()},
154+
{'Reason-String', mqtt_utf8_string()},
155155
user_property()
156156
])),
157157
maps:from_list(L)).
@@ -161,7 +161,7 @@ user_property() ->
161161
non_empty(list(frequency(
162162
[{5, utf8_string_pair()},
163163
%% "The same name is allowed to appear more than once." [v5 3.3.2.3.7]
164-
{1, {<<"same name">>, utf8_string()}},
164+
{1, {<<"same name">>, mqtt_utf8_string()}},
165165
{1, {<<"same name">>, <<"same value">>}}
166166
])))}.
167167

@@ -204,11 +204,11 @@ binary_up_to(N) ->
204204

205205
%% v5 1.5.7
206206
utf8_string_pair() ->
207-
{utf8_string(), utf8_string()}.
207+
{mqtt_utf8_string(), mqtt_utf8_string()}.
208208

209209
%% "Unless stated otherwise all UTF-8 encoded strings can have any length
210210
%% in the range 0 to 65,535 bytes." v5 1.5.4
211-
utf8_string() ->
211+
mqtt_utf8_string() ->
212212
%% Defining an upper size other than 'inf' is too slow because the
213213
%% test ?SIZE is not taken into account anymore.
214214
MaxCodePointSize = 4,

0 commit comments

Comments
 (0)