Skip to content
Closed
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ func (s *testState) StartGorouterOrFail() {
}

func (s *testState) StopAndCleanup() {
// Stop router before NATS to prevent subscriber's ClosedCB from
// firing log.Fatal → os.Exit(1), which kills the test proc
if s.gorouterSession != nil && s.gorouterSession.ExitCode() == -1 {
Eventually(s.gorouterSession.Terminate(), 5).Should(Exit(0))
}

if s.natsRunner != nil {
s.natsRunner.Stop()
}
Expand All @@ -308,10 +314,6 @@ func (s *testState) StopAndCleanup() {

os.RemoveAll(s.tmpdir)

if s.gorouterSession != nil && s.gorouterSession.ExitCode() == -1 {
Eventually(s.gorouterSession.Terminate(), 5).Should(Exit(0))
}

if s.fakeMetron != nil {
s.StopMetron()
}
Expand Down
Loading