Skip to content

Commit

Permalink
Merge pull request kubernetes#3380 from erictune/undelta
Browse files Browse the repository at this point in the history
Fix flaky test.
  • Loading branch information
dchen1107 committed Jan 10, 2015
2 parents f2b82c6 + f381579 commit 2b5f939
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pkg/client/cache/undelta_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ import (
type t struct{ int }

var (
o1 interface{} = t{1}
o2 interface{} = t{2}
l1 []interface{} = []interface{}{t{1}}
l12 []interface{} = []interface{}{t{1}, t{2}}
o1 interface{} = t{1}
o2 interface{} = t{2}
l1 []interface{} = []interface{}{t{1}}
)

func TestUpdateCallsPush(t *testing.T) {
Expand Down Expand Up @@ -99,13 +98,12 @@ func TestReplaceCallsPush(t *testing.T) {

m := make(map[string]interface{})
m["1"] = o1
m["2"] = o2

u.Replace(m)
if callcount != 1 {
t.Errorf("Expected 2 calls, got %d", callcount)
t.Errorf("Expected 1 calls, got %d", callcount)
}
expected := l12
expected := l1
if !reflect.DeepEqual(expected, got) {
t.Errorf("Expected %#v, Got %#v", expected, got)
}
Expand Down

0 comments on commit 2b5f939

Please sign in to comment.