mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
integration: use unix sockets in TestEmbedEtcd
Was getting tcp port conflicts in semphore even after assigning unique ports. Fixes #5953
This commit is contained in:
@@ -88,15 +88,11 @@ func TestEmbedEtcd(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// 4000x so no conflict with e2e tests
|
||||
var embedBasePort = 40000
|
||||
|
||||
func newEmbedURLs(n int) (urls []url.URL) {
|
||||
for i := 0; i < n; i++ {
|
||||
u, _ := url.Parse(fmt.Sprintf("http://localhost:%d", embedBasePort+i))
|
||||
u, _ := url.Parse(fmt.Sprintf("unix://localhost:%d.%d.sock", os.Getpid(), i))
|
||||
urls = append(urls, *u)
|
||||
}
|
||||
embedBasePort += n
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user