htlcswitch: use mock clock in TestMailBoxAddExpiry
This commit replaces the clock used in the unit test `TestMailBoxAddExpiry`. Previously the `TestClock` is used, resulting in the unit test being not so "unit" as the maintainer needs to know the detailed implementation of `clock.Clock`, resulting in debugging a failed unit test more difficult as the cognitive cost is high. Re-implement `clock.Clock` also means we need to maintain more. This is now solved by using mock clock so we can ignore the implementation details and care only the returned results.
This commit is contained in:
2 files changed
+61
-17
No files matched your search
@@ -205,6 +205,9 @@ certain large transactions](https://github.com/lightningnetwork/lnd/pull/7100).
|
||||
* [Code style cleanup](https://github.com/lightningnetwork/lnd/pull/7308) in the
|
||||
funding package.
|
||||
|
||||
* [Fixed a flake in the TestMailBoxAddExpiry unit
|
||||
test](https://github.com/lightningnetwork/lnd/pull/7314).
|
||||
|
||||
## `lncli`
|
||||
|
||||
* [Add an `insecure` flag to skip tls auth as well as a `metadata` string slice
|
||||
|
||||
Reference in new issue
Block a user