Esempio n. 1
0
func nextAvailPort() uint16 {
	p, e := common.GrabEphemeralPort()
	if e != nil {
		panic(e)
	}
	return p
}
Esempio n. 2
0
func NewTestApp(urls []route.Uri, rPort uint16, mbusClient yagnats.NATSClient, tags map[string]string) *TestApp {
	app := new(TestApp)

	port, _ := common.GrabEphemeralPort()

	app.port = port
	app.rPort = rPort
	app.urls = urls
	app.mbusClient = mbusClient
	app.tags = tags

	app.mux = http.NewServeMux()

	return app
}
Esempio n. 3
0
func NewTestApp(urls []string, rPort uint16, mbusClient mbus.CFMessageBus, tags map[string]string) *TestApp {
	app := new(TestApp)

	port, _ := common.GrabEphemeralPort()

	app.port = port
	app.rPort = rPort
	app.urls = urls
	app.mbusClient = mbusClient
	app.tags = tags

	app.mux = http.NewServeMux()

	return app
}
Esempio n. 4
0
func NextAvailPort() uint16 {
	port, err := vcap.GrabEphemeralPort()
	Ω(err).ShouldNot(HaveOccurred())

	return port
}