Beispiel #1
0
func nextAvailPort() uint16 {
	p, e := common.GrabEphemeralPort()
	if e != nil {
		panic(e)
	}
	return p
}
Beispiel #2
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
}