File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
internal/backend/semtechudp Expand file tree Collapse file tree 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() {
442442 {Status : gw .TxAckStatus_IGNORED },
443443 }, cache .DefaultExpiration )
444444
445+ // Create ack channel
446+ ackChan := make (chan * gw.DownlinkTxAck , 1 )
447+ ts .backend .SetDownlinkTxAckFunc (func (pl * gw.DownlinkTxAck ) {
448+ ackChan <- pl
449+ })
450+
445451 // send a nack on the first downlink attempt
446452 ack1 := packets.TXACKPacket {
447453 ProtocolVersion : packets .ProtocolVersion2 ,
@@ -502,10 +508,6 @@ func (ts *BackendTestSuite) TestTXAckRetryFailFail() {
502508 assert .NoError (err )
503509
504510 // validate final ack
505- ackChan := make (chan * gw.DownlinkTxAck , 1 )
506- ts .backend .SetDownlinkTxAckFunc (func (pl * gw.DownlinkTxAck ) {
507- ackChan <- pl
508- })
509511 txAck := <- ackChan
510512 assert .Equal (& gw.DownlinkTxAck {
511513 GatewayId : "0102030405060708" ,
You can’t perform that action at this time.
0 commit comments