Пример #1
0
					app.VerifyAppStatus(404)
				})
			})
		})
	})

	It("sends start on a nats connect", func() {
		started := make(chan bool)
		cb := make(chan bool)

		mbusClient.Subscribe("router.start", func(*nats.Msg) {
			started <- true
		})

		mbusClient.AddReconnectedCB(func(_ *nats.Conn) {
			cb <- true
		})

		natsRunner.Stop()
		natsRunner.Start()

		Eventually(started, 4).Should(Receive())
		Eventually(cb, 4).Should(Receive())
	})

	It("registry contains last updated varz", func() {
		app1 := test.NewGreetApp([]route.Uri{"test1.vcap.me"}, config.Port, mbusClient, nil)
		app1.Listen()

		Eventually(func() bool {
			return appRegistered(registry, app1)