Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test
  • Loading branch information
alpe committed Mar 18, 2026
commit 9e3e8e56d3fc2b454feef4150f0a76c5c38dd5fd
4 changes: 2 additions & 2 deletions test/e2e/failover_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -989,10 +989,10 @@ func must[T any](r T, err error) T {
func IsNodeUp(t *testing.T, rpcAddr string, timeout time.Duration) bool {
t.Helper()
t.Logf("Query node is up: %s", rpcAddr)
ctx, done := context.WithTimeout(context.Background(), timeout)
ctx, done := context.WithTimeout(t.Context(), timeout)
defer done()

ticker := time.NewTimer(min(timeout/10, 200*time.Millisecond))
ticker := time.NewTicker(min(timeout/10, 200*time.Millisecond))
defer ticker.Stop()
c := client.NewClient(rpcAddr)
require.NotNil(t, c)
Expand Down
8 changes: 6 additions & 2 deletions test/e2e/sut_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,12 @@ func (s *SystemUnderTest) awaitProcessCleanup(cmd *exec.Cmd) {
s.cmdToPids[cmdKey] = append(s.cmdToPids[cmdKey], pid)
s.pidsLock.Unlock()
go func() {
_ = cmd.Wait() // blocks until shutdown
s.logf("Process stopped, pid: %d\n", pid)
waitErr := cmd.Wait() // blocks until shutdown
if waitErr != nil {
s.logf("Process stopped, pid: %d, err: %v\n", pid, waitErr)
} else {
s.logf("Process stopped, pid: %d\n", pid)
}
s.pidsLock.Lock()
defer s.pidsLock.Unlock()
delete(s.pids, pid)
Expand Down
Loading