File tree 1 file changed +6
-4
lines changed
internal/backend/semtechudp
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -442,6 +442,12 @@ func (ts *BackendTestSuite) TestTXAckRetryFailFail() {
442
442
{Status : gw .TxAckStatus_IGNORED },
443
443
}, cache .DefaultExpiration )
444
444
445
+ // Create ack channel
446
+ ackChan := make (chan * gw.DownlinkTxAck , 1 )
447
+ ts .backend .SetDownlinkTxAckFunc (func (pl * gw.DownlinkTxAck ) {
448
+ ackChan <- pl
449
+ })
450
+
445
451
// send a nack on the first downlink attempt
446
452
ack1 := packets.TXACKPacket {
447
453
ProtocolVersion : packets .ProtocolVersion2 ,
@@ -502,10 +508,6 @@ func (ts *BackendTestSuite) TestTXAckRetryFailFail() {
502
508
assert .NoError (err )
503
509
504
510
// validate final ack
505
- ackChan := make (chan * gw.DownlinkTxAck , 1 )
506
- ts .backend .SetDownlinkTxAckFunc (func (pl * gw.DownlinkTxAck ) {
507
- ackChan <- pl
508
- })
509
511
txAck := <- ackChan
510
512
assert .Equal (& gw.DownlinkTxAck {
511
513
GatewayId : "0102030405060708" ,
You can’t perform that action at this time.
0 commit comments