示例#1
0
func nextAvailPort() uint16 {
	p, e := common.GrabEphemeralPort()
	if e != nil {
		panic(e)
	}
	return p
}
示例#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
}
示例#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
}
示例#4
0
func NextAvailPort() uint16 {
	port, err := vcap.GrabEphemeralPort()
	Ω(err).ShouldNot(HaveOccurred())

	return port
}