Skip to content

Commit

Permalink
Print backtrace when RPC fails
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Jun 13, 2024
1 parent d922aff commit ee26069
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/soroban-rpc/internal/test/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"context"
"fmt"
"log"
"net"
"net/http"
"net/http/httptest"
Expand All @@ -14,6 +15,7 @@ import (
"os/signal"
"path"
"path/filepath"
"runtime"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -253,6 +255,9 @@ func (i *Test) waitForRPC() {
time.Sleep(time.Second)
}
if !success {
buf := make([]byte, 1<<16)
stackSize := runtime.Stack(buf, true)
log.Printf("%s\n", string(buf[0:stackSize]))
i.t.Fatal("RPC failed to get healthy in 30 seconds")
}
}
Expand Down

0 comments on commit ee26069

Please sign in to comment.