We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5208a49 commit 2efafc1Copy full SHA for 2efafc1
test/mqtt-sn-pub-test.rb
@@ -353,4 +353,24 @@ def test_hostname_lookup_fail
353
assert_match /nodename nor servname provided, or not known/, @cmd_result[0]
354
end
355
356
+ def test_disconnect_duration_warning
357
+ fake_server do |fs|
358
+ def fs.handle_disconnect(packet)
359
+ MQTT::SN::Packet::Disconnect.new(
360
+ :duration => 10
361
+ )
362
+ end
363
+
364
+ @cmd_result = run_cmd(
365
+ 'mqtt-sn-pub',
366
+ '-T' => 10,
367
+ '-m' => 'message',
368
+ '-p' => fs.port,
369
+ '-h' => fs.address
370
371
372
373
+ assert_match /DISCONNECT warning. Gateway returned duration in disconnect packet/, @cmd_result[0]
374
375
376
0 commit comments