refactor change testAndSet to CompareAndSwap

This commit is contained in:
Xiang Li
2013-10-14 22:32:22 -07:00
parent 545f8ed6a1
commit 9ebdcb8ae3
13 changed files with 66 additions and 64 deletions

View File

@ -2,9 +2,9 @@ package etcd
import (
"fmt"
"testing"
"net/url"
"net"
"net/url"
"testing"
)
// To pass this test, we need to create a cluster of 3 machines
@ -19,7 +19,7 @@ func TestSync(t *testing.T) {
t.Fatal("cannot sync machines")
}
for _, m := range(c.GetCluster()) {
for _, m := range c.GetCluster() {
u, err := url.Parse(m)
if err != nil {
t.Fatal(err)
@ -27,7 +27,7 @@ func TestSync(t *testing.T) {
if u.Scheme != "http" {
t.Fatal("scheme must be http")
}
host, _, err := net.SplitHostPort(u.Host)
if err != nil {
t.Fatal(err)

View File

@ -1,4 +1,3 @@
package main
import (