"net/http"
"net/url"
"os"
+ "sync"
"testing"
"time"
suite.Suite
listener net.Listener
xAppMgrFunc do
+ mu sync.Mutex
}
// suite setup creates the HTTP server
http.HandleFunc(url, func(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case "GET":
+ suite.mu.Lock()
suite.xAppMgrFunc(w)
+ suite.mu.Unlock()
}
})
http.Serve(listener, nil)