Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
test cleanup
Browse files Browse the repository at this point in the history
Change-Id: Iad508688cd8d2751c5a8bcdb52e5b9a7edabdb8e
  • Loading branch information
theganyo committed Apr 26, 2019
1 parent 912c157 commit 9f21840
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions adapter/quota/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ func TestSync(t *testing.T) {

fakeTime = fakeTime + 10
time.Sleep(10 * time.Millisecond) // allow idle sync
b.refreshAfter = time.Hour

b.lock.RLock()
if b.request.Weight != 0 {
Expand Down Expand Up @@ -228,7 +229,10 @@ func TestSync(t *testing.T) {
t.Errorf("should not have received error on apply: %v", err)
}
fakeTime = fakeTime + 10
b.sync()
err = b.sync()
if err != nil {
t.Errorf("should not have received error on sync: %v", err)
}

b.lock.Lock()
if b.request.Weight != 0 {
Expand All @@ -249,8 +253,6 @@ func TestSync(t *testing.T) {
if m.buckets[quotaID] != nil {
t.Errorf("old bucket should have been deleted")
}

b.refreshAfter = time.Hour
}

func TestDisconnected(t *testing.T) {
Expand Down

0 comments on commit 9f21840

Please sign in to comment.