From e1dc25bedcf1f956fcd31ae7077a4b1c545647c3 Mon Sep 17 00:00:00 2001 From: Manan Gupta Date: Wed, 6 Nov 2024 11:14:23 +0530 Subject: [PATCH] feat: print vtadmin file in case of error Signed-off-by: Manan Gupta --- go/test/endtoend/cluster/vtadmin_process.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/go/test/endtoend/cluster/vtadmin_process.go b/go/test/endtoend/cluster/vtadmin_process.go index df5ce9441ff..39a63a377f3 100644 --- a/go/test/endtoend/cluster/vtadmin_process.go +++ b/go/test/endtoend/cluster/vtadmin_process.go @@ -132,7 +132,13 @@ func (vp *VtAdminProcess) Setup() (err error) { vp.exit = make(chan error) go func() { if vp.proc != nil { - vp.exit <- vp.proc.Wait() + exitErr := vp.proc.Wait() + if exitErr != nil { + log.Errorf("vtadmin process exited with error: %v", exitErr) + data, _ := os.ReadFile(logFile) + log.Errorf("vtadmin stderr - %s", string(data)) + } + vp.exit <- exitErr close(vp.exit) } }()