func tryInBackground(monitRetryStrategy boshretry.RetryStrategy) chan error {
	errChan := make(chan error)
	go func() {
		errChan <- monitRetryStrategy.Try()
	}()
	return errChan
}
	fakeboshaction "github.com/cloudfoundry/bosh-agent/agent/action/fakes"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"

	"io"

	. "github.com/cloudfoundry/bosh-agent/jobsupervisor/monit"
)

var _ = Describe("MonitRetryStrategy", func() {
	var (
		retryable              *fakehttp.FakeRequestRetryable
		monitRetryStrategy     boshretry.RetryStrategy
		maxUnavailableAttempts int
		maxOtherAttempts       int
		timeService            *fakeboshaction.FakeClock
		delay                  time.Duration
	)

	type ClosedChecker interface {
		io.ReadCloser
		Closed() bool
	}

	BeforeEach(func() {
		maxUnavailableAttempts = 6
		maxOtherAttempts = 7
		retryable = fakehttp.NewFakeRequestRetryable()
		timeService = &fakeboshaction.FakeClock{}
		delay = 10 * time.Millisecond