test: print response

This commit is contained in:
Richard Ramos 2024-05-29 23:15:24 -04:00
parent 91ca415b19
commit 1c390072f1
No known key found for this signature in database
GPG Key ID: 1CE87DB518195760

View File

@ -4,6 +4,7 @@ import (
"context" "context"
"database/sql" "database/sql"
"encoding/hex" "encoding/hex"
"encoding/json"
"errors" "errors"
"fmt" "fmt"
"net" "net"
@ -344,7 +345,8 @@ func retrieveHistory(ctx context.Context, runId string, storenodes []peer.AddrIn
nextRetryLbl: nextRetryLbl:
for i := 0; i < maxAttempts; i++ { for i := 0; i < maxAttempts; i++ {
logger.Info("EXECUTING NEXT!!!", zap.String("cursor", hex.EncodeToString(result.Cursor()))) a, _ := json.Marshal(result.Response())
logger.Info("EXECUTING NEXT!!!", zap.String("cursor", hex.EncodeToString(result.Cursor())), zap.String("RESPONSE", string(a)))
err = result.Next(ctx) err = result.Next(ctx)
if err != nil { if err != nil {
logger.Error("could not query storenode", zap.Stringer("storenode", node), zap.Error(err)) logger.Error("could not query storenode", zap.Stringer("storenode", node), zap.Error(err))