Skip to content
/ etcd Public
forked from etcd-io/etcd

Commit

Permalink
integration: use only digits in unix ports
Browse files Browse the repository at this point in the history
  • Loading branch information
gyuho committed Jan 5, 2017
1 parent 5feb4e1 commit f3eb027
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion integration/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type bridge struct {

func newBridge(addr string) (*bridge, error) {
b := &bridge{
inaddr: addr + ".bridge",
inaddr: addr + "0",
outaddr: addr,
conns: make(map[*bridgeConn]struct{}),
stopc: make(chan struct{}, 1),
Expand Down
6 changes: 3 additions & 3 deletions integration/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ func (c *cluster) waitVersion() {
}

func (c *cluster) name(i int) string {
return fmt.Sprint("node", i)
return fmt.Sprint(i)
}

// isMembersEqual checks whether two members equal except ID field.
Expand All @@ -420,7 +420,7 @@ func isMembersEqual(membs []client.Member, wmembs []client.Member) bool {

func newLocalListener(t *testing.T) net.Listener {
c := atomic.AddInt64(&localListenCount, 1)
addr := fmt.Sprintf("127.0.0.1:%d.%d.sock", c+basePort, os.Getpid())
addr := fmt.Sprintf("127.0.0.1:%d%d", c+basePort, os.Getpid())
return NewListenerWithAddr(t, addr)
}

Expand Down Expand Up @@ -510,7 +510,7 @@ func mustNewMember(t *testing.T, mcfg memberConfig) *member {
// listenGRPC starts a grpc server over a unix domain socket on the member
func (m *member) listenGRPC() error {
// prefix with localhost so cert has right domain
m.grpcAddr = "localhost:" + m.Name + ".sock"
m.grpcAddr = "localhost:" + m.Name + "0"
l, err := transport.NewUnixListener(m.grpcAddr)
if err != nil {
return fmt.Errorf("listen failed on grpc socket %s (%v)", m.grpcAddr, err)
Expand Down

0 comments on commit f3eb027

Please sign in to comment.