Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Tananaev committed Dec 29, 2020
1 parent 2a61abf commit 20c2436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/traccar/protocol/IotmProtocolDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ protected Object decode(

} else if (msg instanceof MqttSubscribeMessage) {

MqttPublishMessage message = (MqttPublishMessage) msg;
MqttSubscribeMessage message = (MqttSubscribeMessage) msg;

MqttMessage response = MqttMessageBuilders.subAck()
.packetId((short) message.variableHeader().packetId())
.packetId((short) message.variableHeader().messageId())
.build();

if (channel != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public void testDecode() throws Exception {
"123456789012345").build());

verifyPositions(decoder, false, MqttMessageBuilders.publish().payload(binary(
"020208009188752DE7120300013A002000AD59050030B135030340030C300301A00302A00E00D0B9AB5B420334C04100001F060000320004072064008C000162002000C004476F6F440109002100AD59050030BA359B")).qos(MqttQoS.EXACTLY_ONCE).build());
"020208009188752DE7120300013A002000AD59050030B135030340030C300301A00302A00E00D0B9AB5B420334C04100001F060000320004072064008C000162002000C004476F6F440109002100AD59050030BA359B")).qos(MqttQoS.EXACTLY_ONCE).messageId(1).build());

verifyPositions(decoder, false, MqttMessageBuilders.publish().payload(binary(
"020208009188752DE71203000109002000AD590500309635F3")).qos(MqttQoS.EXACTLY_ONCE).build());
"020208009188752DE71203000109002000AD590500309635F3")).qos(MqttQoS.EXACTLY_ONCE).messageId(1).build());

}

Expand Down

0 comments on commit 20c2436

Please sign in to comment.