mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
client/integration: use only digits in unix port
Fix https://github.com/coreos/etcd/issues/7558. Same as https://github.com/coreos/etcd/issues/6959. Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
6511171725
commit
22c52b6d2e
@ -34,7 +34,7 @@ import (
|
|||||||
func TestV2NoRetryEOF(t *testing.T) {
|
func TestV2NoRetryEOF(t *testing.T) {
|
||||||
defer testutil.AfterTest(t)
|
defer testutil.AfterTest(t)
|
||||||
// generate an EOF response; specify address so appears first in sorted ep list
|
// generate an EOF response; specify address so appears first in sorted ep list
|
||||||
lEOF := integration.NewListenerWithAddr(t, fmt.Sprintf("eof:123.%d.sock", os.Getpid()))
|
lEOF := integration.NewListenerWithAddr(t, fmt.Sprintf("127.0.0.1:%05d", os.Getpid()))
|
||||||
defer lEOF.Close()
|
defer lEOF.Close()
|
||||||
tries := uint32(0)
|
tries := uint32(0)
|
||||||
go func() {
|
go func() {
|
||||||
@ -65,8 +65,7 @@ func TestV2NoRetryEOF(t *testing.T) {
|
|||||||
// TestV2NoRetryNoLeader tests destructive api calls won't retry if given an error code.
|
// TestV2NoRetryNoLeader tests destructive api calls won't retry if given an error code.
|
||||||
func TestV2NoRetryNoLeader(t *testing.T) {
|
func TestV2NoRetryNoLeader(t *testing.T) {
|
||||||
defer testutil.AfterTest(t)
|
defer testutil.AfterTest(t)
|
||||||
|
lHttp := integration.NewListenerWithAddr(t, fmt.Sprintf("127.0.0.1:%05d", os.Getpid()))
|
||||||
lHttp := integration.NewListenerWithAddr(t, fmt.Sprintf("errHttp:123.%d.sock", os.Getpid()))
|
|
||||||
eh := &errHandler{errCode: http.StatusServiceUnavailable}
|
eh := &errHandler{errCode: http.StatusServiceUnavailable}
|
||||||
srv := httptest.NewUnstartedServer(eh)
|
srv := httptest.NewUnstartedServer(eh)
|
||||||
defer lHttp.Close()
|
defer lHttp.Close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user