mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-25 17:22:59 +01:00
lntest: make it clear that profile failure is follow-up error
From the error in the itest output log it is not clear whether scraping the profile page caused a test to fail or whether it was just a follow-up error. We make it a bit more clear with an added message.
This commit is contained in:
parent
b149a090df
commit
5cabd980b1
@ -840,7 +840,7 @@ func (n *NetworkHarness) StopNode(node *HarnessNode) error {
|
||||
|
||||
// SaveProfilesPages hits profiles pages of all active nodes and writes it to
|
||||
// disk using a similar naming scheme as to the regular set of logs.
|
||||
func (n *NetworkHarness) SaveProfilesPages() {
|
||||
func (n *NetworkHarness) SaveProfilesPages(t *testing.T) {
|
||||
// Only write gorutine dumps if flag is active.
|
||||
if !(*goroutineDump) {
|
||||
return
|
||||
@ -848,7 +848,8 @@ func (n *NetworkHarness) SaveProfilesPages() {
|
||||
|
||||
for _, node := range n.activeNodes {
|
||||
if err := saveProfilesPage(node); err != nil {
|
||||
fmt.Printf("Error: %v\n", err)
|
||||
t.Logf("Logging follow-up error only, see rest of "+
|
||||
"the log for actual cause: %v\n", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ func (h *harnessTest) Skipf(format string, args ...interface{}) {
|
||||
// the error stack traces it produces.
|
||||
func (h *harnessTest) Fatalf(format string, a ...interface{}) {
|
||||
if h.lndHarness != nil {
|
||||
h.lndHarness.SaveProfilesPages()
|
||||
h.lndHarness.SaveProfilesPages(h.t)
|
||||
}
|
||||
|
||||
stacktrace := errors.Wrap(fmt.Sprintf(format, a...), 1).ErrorStack()
|
||||
|
@ -1167,7 +1167,8 @@ func (hn *HarnessNode) stop() error {
|
||||
if hn.conn != nil {
|
||||
err := hn.conn.Close()
|
||||
if err != nil {
|
||||
return fmt.Errorf("error attempting to stop grpc client: %v", err)
|
||||
return fmt.Errorf("error attempting to stop grpc "+
|
||||
"client: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user