Esempio n. 1
0
				}

				err := bbsClient.DesireLRP(otherDomainDesired)
				Expect(err).NotTo(HaveOccurred())

				otherDomainDesiredResponse, err = bbsClient.DesiredLRPByProcessGuid("some-other-lrp")
				Expect(err).NotTo(HaveOccurred())
			})

			It("leaves them alone", func() {
				Eventually(func() ([]*models.DesiredLRP, error) { return bbsClient.DesiredLRPs(models.DesiredLRPFilter{}) }, 5).Should(HaveLen(4))

				nowDesired, err := bbsClient.DesiredLRPs(models.DesiredLRPFilter{})
				Expect(err).NotTo(HaveOccurred())

				otherDomainDesiredResponse.Ports = nil
				Expect(nowDesired).To(ContainElement(otherDomainDesiredResponse))
			})
		})
	})

	Context("when the bulker loses the lock", func() {
		BeforeEach(func() {
			heartbeatInterval = 1 * time.Second
		})

		JustBeforeEach(func() {
			process = startBulker(true)

			Eventually(bbsClient.Domains, 5*domainTTL).Should(ContainElement("cf-apps"))