test: hack fix of panic by disabling btcrpcclient log
This commit is contained in:
parent
8fa2b95c12
commit
aed2e5865f
@ -290,7 +290,6 @@ func loadConfig() (*config, error) {
|
|||||||
|
|
||||||
// Initialize logging at the default logging level.
|
// Initialize logging at the default logging level.
|
||||||
initLogRotator(filepath.Join(cfg.LogDir, defaultLogFilename))
|
initLogRotator(filepath.Join(cfg.LogDir, defaultLogFilename))
|
||||||
setLogLevels(defaultLogLevel)
|
|
||||||
|
|
||||||
// Parse, validate, and set debug log level(s).
|
// Parse, validate, and set debug log level(s).
|
||||||
if err := parseAndSetDebugLevels(cfg.DebugLevel); err != nil {
|
if err := parseAndSetDebugLevels(cfg.DebugLevel); err != nil {
|
||||||
|
@ -19,6 +19,7 @@ import (
|
|||||||
|
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
|
||||||
|
"github.com/btcsuite/btclog"
|
||||||
"github.com/davecgh/go-spew/spew"
|
"github.com/davecgh/go-spew/spew"
|
||||||
"github.com/go-errors/errors"
|
"github.com/go-errors/errors"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc"
|
"github.com/lightningnetwork/lnd/lnrpc"
|
||||||
@ -3015,6 +3016,12 @@ func TestLightningNetworkDaemon(t *testing.T) {
|
|||||||
ht.Fatalf("unable to create mining node: %v", err)
|
ht.Fatalf("unable to create mining node: %v", err)
|
||||||
}
|
}
|
||||||
defer btcdHarness.TearDown()
|
defer btcdHarness.TearDown()
|
||||||
|
|
||||||
|
// Turn off the btcd rpc logging, otherwise it will lead to panic.
|
||||||
|
// TODO(andrew.shvv|roasbeef) Remove the hack after re-work the way the log
|
||||||
|
// rotator os work.
|
||||||
|
btcrpcclient.UseLogger(btclog.Disabled)
|
||||||
|
|
||||||
if err := btcdHarness.SetUp(true, 50); err != nil {
|
if err := btcdHarness.SetUp(true, 50); err != nil {
|
||||||
ht.Fatalf("unable to set up mining node: %v", err)
|
ht.Fatalf("unable to set up mining node: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user