Commit 0e52218c authored by Joshua Gutow's avatar Joshua Gutow

op-service: Fix txmgr test

The context in txmgr.Send is now being checked for cancellations by the
retry package which wraps craftTx. This caused an error in one of the
txmgr queue tests. The flow of the test is that it would send a valid tx,
send an invalid tx, and then send another tx. It'd expect that the last
tx got cancelled because of the context cancellation propogation (i.e. if
one tx in the queue fails, all will fail).

Because the context is cancelled prior to the call to txmgr.Send & this
check on the context, the transaction is no longer failing in the receipt
loop, but at craftTx. This test checked that the transaction would make it
to the receipt loop (via hooking into sendTx where it recorded the nonce).
parent 6b0b8a00
......@@ -159,7 +159,7 @@ func TestSend(t *testing.T) {
{sendErr: true},
{},
},
nonces: []uint64{0, 1, 1},
nonces: []uint64{0, 1},
total: 3 * time.Second,
},
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment