Exemple #1
0
)

type immediateRetryPolicy struct{}

func (immediateRetryPolicy) DelayFor(uint) (time.Duration, bool) {
	return 0, true
}

var _ = Describe("DBProvider", func() {
	var (
		fakeDB *fakes.FakeWorkerDB

		logger *lagertest.TestLogger

		worker                *gfakes.FakeBackend
		workerAddr            string
		workerBaggageclaimURL string
		workerServer          *server.GardenServer
		provider              WorkerProvider

		workers    []Worker
		workersErr error
	)

	BeforeEach(func() {
		fakeDB = new(fakes.FakeWorkerDB)
		logger = lagertest.NewTestLogger("test")
		worker = new(gfakes.FakeBackend)

		workerAddr = fmt.Sprintf("0.0.0.0:%d", 8888+GinkgoParallelNode())
		workerBaggageclaimURL = "http://1.2.3.4:7788"
Exemple #2
0
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("DBProvider", func() {
	var (
		fakeDB *fakes.FakeWorkerDB

		logger *lagertest.TestLogger

		workerA *gfakes.FakeBackend
		workerB *gfakes.FakeBackend

		workerAAddr string
		workerBAddr string

		workerAServer *server.GardenServer
		workerBServer *server.GardenServer

		provider WorkerProvider

		workers    []Worker
		workersErr error
	)

	BeforeEach(func() {
		fakeDB = new(fakes.FakeWorkerDB)

		logger = lagertest.NewTestLogger("test")