mirror of
https://github.com/go-delve/delve.git
synced 2025-10-27 20:23:41 +08:00
Bind to less used port in test
This commit is contained in:
@ -12,5 +12,5 @@ func main() {
|
||||
header := w.Header().Get("Content-Type")
|
||||
w.Write([]byte(msg + header))
|
||||
})
|
||||
http.ListenAndServe(":8080", nil)
|
||||
http.ListenAndServe(":9191", nil)
|
||||
}
|
||||
|
||||
@ -324,14 +324,14 @@ func TestNextNetHTTP(t *testing.T) {
|
||||
}
|
||||
// Wait for program to start listening.
|
||||
for {
|
||||
conn, err := net.Dial("tcp", ":8080")
|
||||
conn, err := net.Dial("tcp", ":9191")
|
||||
if err == nil {
|
||||
conn.Close()
|
||||
break
|
||||
}
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
}
|
||||
http.Get("http://localhost:8080")
|
||||
http.Get("http://localhost:9191")
|
||||
}()
|
||||
if err := p.Continue(); err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user