diff --git a/src/code.cloudfoundry.org/inigo/cell/assets/fake_app_test.go b/src/code.cloudfoundry.org/inigo/cell/assets/fake_app_test.go index d05c8c43e..4f5a84e37 100644 --- a/src/code.cloudfoundry.org/inigo/cell/assets/fake_app_test.go +++ b/src/code.cloudfoundry.org/inigo/cell/assets/fake_app_test.go @@ -85,17 +85,6 @@ var _ = Describe("Fake App Exit Behavior", Serial, func() { session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter) Expect(err).NotTo(HaveOccurred()) - // Ensure cleanup on test completion - defer func() { - if session.ExitCode() == -1 { // Process still running - session.Kill() - } - // On Windows, add extra cleanup time - if runtime.GOOS == "windows" { - time.Sleep(100 * time.Millisecond) - } - }() - // Wait for server to start Eventually(func() error { client := &http.Client{Timeout: 1 * time.Second} @@ -125,17 +114,6 @@ var _ = Describe("Fake App Exit Behavior", Serial, func() { session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter) Expect(err).NotTo(HaveOccurred()) - // Ensure cleanup on test completion - defer func() { - if session.ExitCode() == -1 { // Process still running - session.Kill() - } - // On Windows, add extra cleanup time - if runtime.GOOS == "windows" { - time.Sleep(100 * time.Millisecond) - } - }() - // Wait for server to start Eventually(func() error { client := &http.Client{Timeout: 1 * time.Second} @@ -165,17 +143,6 @@ var _ = Describe("Fake App Exit Behavior", Serial, func() { session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter) Expect(err).NotTo(HaveOccurred()) - // Ensure cleanup on test completion - defer func() { - if session.ExitCode() == -1 { // Process still running - session.Kill() - } - // On Windows, add extra cleanup time - if runtime.GOOS == "windows" { - time.Sleep(100 * time.Millisecond) - } - }() - // Wait for app to start listening Eventually(func() error { client := &http.Client{Timeout: 1 * time.Second} diff --git a/src/code.cloudfoundry.org/inigo/cell/assets/fake_proxy_test.go b/src/code.cloudfoundry.org/inigo/cell/assets/fake_proxy_test.go index d7e88931d..5e673fca1 100644 --- a/src/code.cloudfoundry.org/inigo/cell/assets/fake_proxy_test.go +++ b/src/code.cloudfoundry.org/inigo/cell/assets/fake_proxy_test.go @@ -40,17 +40,6 @@ var _ = Describe("Fake Proxy Exit Behavior", Serial, func() { session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter) Expect(err).NotTo(HaveOccurred()) - // Ensure cleanup on test completion - defer func() { - if session.ExitCode() == -1 { // Process still running - session.Kill() - } - // On Windows, add extra cleanup time - if runtime.GOOS == "windows" { - time.Sleep(100 * time.Millisecond) - } - }() - // Wait for proxy to start listening on port 61001 Eventually(func() error { client := &http.Client{Timeout: 1 * time.Second} @@ -79,17 +68,6 @@ var _ = Describe("Fake Proxy Exit Behavior", Serial, func() { session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter) Expect(err).NotTo(HaveOccurred()) - // Ensure cleanup on test completion - defer func() { - if session.ExitCode() == -1 { // Process still running - session.Kill() - } - // On Windows, add extra cleanup time - if runtime.GOOS == "windows" { - time.Sleep(100 * time.Millisecond) - } - }() - // Wait for proxy to start listening on port 61001 Eventually(func() error { client := &http.Client{Timeout: 1 * time.Second} @@ -136,17 +114,6 @@ var _ = Describe("Fake Proxy Exit Behavior", Serial, func() { session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter) Expect(err).NotTo(HaveOccurred()) - // Ensure cleanup on test completion - defer func() { - if session.ExitCode() == -1 { // Process still running - session.Kill() - } - // On Windows, add extra cleanup time - if runtime.GOOS == "windows" { - time.Sleep(100 * time.Millisecond) - } - }() - // Wait for proxy to start Eventually(func() error { client := &http.Client{Timeout: 1 * time.Second} @@ -192,17 +159,6 @@ var _ = Describe("Fake Proxy Exit Behavior", Serial, func() { session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter) Expect(err).NotTo(HaveOccurred()) - // Ensure cleanup on test completion - defer func() { - if session.ExitCode() == -1 { // Process still running - session.Kill() - } - // On Windows, add extra cleanup time - if runtime.GOOS == "windows" { - time.Sleep(100 * time.Millisecond) - } - }() - // Wait for proxy to start listening Eventually(func() error { client := &http.Client{Timeout: 1 * time.Second}