*: fix minor typos

This commit is contained in:
Gyu-Ho Lee 2016-10-31 09:47:15 -07:00
parent a1a2d2b1e7
commit 5bd00ab1f6
4 changed files with 5 additions and 5 deletions

View File

@ -40,7 +40,7 @@ func TestBalancerGetUnblocking(t *testing.T) {
down2 := sb.Up(grpc.Address{Addr: endpoints[2]}) down2 := sb.Up(grpc.Address{Addr: endpoints[2]})
addrFirst, putFun, err := sb.Get(context.Background(), unblockingOpts) addrFirst, putFun, err := sb.Get(context.Background(), unblockingOpts)
if err != nil { if err != nil {
t.Errorf("Get() with up endpoints should sucess, got %v", err) t.Errorf("Get() with up endpoints should success, got %v", err)
} }
if addrFirst.Addr != endpoints[1] && addrFirst.Addr != endpoints[2] { if addrFirst.Addr != endpoints[1] && addrFirst.Addr != endpoints[2] {
t.Errorf("Get() didn't return expected address, got %v", addrFirst) t.Errorf("Get() didn't return expected address, got %v", addrFirst)
@ -80,7 +80,7 @@ func TestBalancerGetBlocking(t *testing.T) {
}() }()
addrFirst, putFun, err := sb.Get(context.Background(), blockingOpts) addrFirst, putFun, err := sb.Get(context.Background(), blockingOpts)
if err != nil { if err != nil {
t.Errorf("Get() with up endpoints should sucess, got %v", err) t.Errorf("Get() with up endpoints should success, got %v", err)
} }
if addrFirst.Addr != endpoints[1] { if addrFirst.Addr != endpoints[1] {
t.Errorf("Get() didn't return expected address, got %v", addrFirst) t.Errorf("Get() didn't return expected address, got %v", addrFirst)

View File

@ -1243,7 +1243,7 @@ func TestPublishRetry(t *testing.T) {
t.Errorf("len(action) = %d, want >= 2 (%v)", len(action), err) t.Errorf("len(action) = %d, want >= 2 (%v)", len(action), err)
} }
close(srv.stopping) close(srv.stopping)
// drain remaing actions, if any, so publish can terminate // drain remaining actions, if any, so publish can terminate
for { for {
select { select {
case <-ch: case <-ch:

View File

@ -56,7 +56,7 @@ func performWatchOnPrefixes(ctx context.Context, getClient getClientFunc, round
defer client.Close() defer client.Close()
// get revision using get request // get revision using get request
gr = getWithRetry(client, ctx, "non-existant") gr = getWithRetry(client, ctx, "non-existent")
revision = gr.Header.Revision revision = gr.Header.Revision
ctxt, cancel := context.WithDeadline(ctx, time.Now().Add(runningTime)) ctxt, cancel := context.WithDeadline(ctx, time.Now().Add(runningTime))

View File

@ -272,7 +272,7 @@ func (ls *leaseStresser) randomlyDropLeases() {
defer wg.Done() defer wg.Done()
dropped, err := ls.randomlyDropLease(leaseID) dropped, err := ls.randomlyDropLease(leaseID)
// if randomlyDropLease encountered an error such as context is cancelled, remove the lease from aliveLeases // if randomlyDropLease encountered an error such as context is cancelled, remove the lease from aliveLeases
// becasue we can't tell whether the lease is dropped or not. // because we can't tell whether the lease is dropped or not.
if err != nil { if err != nil {
plog.Debugf("drop lease %v has failed error (%v)", leaseID, err) plog.Debugf("drop lease %v has failed error (%v)", leaseID, err)
ls.aliveLeases.remove(leaseID) ls.aliveLeases.remove(leaseID)