Skip to content

Commit

Permalink
Merge pull request #2277 from yyforyongyu/fix-shutdown-itest
Browse files Browse the repository at this point in the history
rpctest: make sure to `WaitForShutdown`
  • Loading branch information
Roasbeef authored Dec 10, 2024
2 parents ec0b90d + 814a1fc commit e646d43
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions integration/rpctest/rpc_harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,12 @@ func (h *Harness) SetUp(createTestChain bool, numMatureOutputs uint32) error {
func (h *Harness) tearDown() error {
if h.Client != nil {
h.Client.Shutdown()
h.Client.WaitForShutdown()
}

if h.BatchClient != nil {
h.BatchClient.Shutdown()
h.BatchClient.WaitForShutdown()
}

if err := h.node.shutdown(); err != nil {
Expand Down Expand Up @@ -570,10 +572,10 @@ func NextAvailablePortForProcess(pid int) int {
os.TempDir(), fmt.Sprintf("rpctest-port-pid-%d.lock", pid),
)
timeout := time.After(time.Second)

var (
lockFileHandle *os.File
err error
err error
)
for {
// Attempt to acquire the lock file. If it already exists, wait
Expand Down

0 comments on commit e646d43

Please sign in to comment.