Skip to content

Commit

Permalink
Updated backup tests to support new channel read syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
feyeleanor committed Mar 16, 2011
1 parent 1ef4160 commit 0f3e536
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ func TestTransfers(t *testing.T) {
})
}

func (r *Reporter) finished(t *testing.T) (finished bool) {
report := <- (*r)
func (r *Reporter) finished(t *testing.T) bool {
report, ok := <- (*r)
if report != nil {
switch e := report.Error.(type) {
case Errno: if e != DONE { t.Fatalf("Backup error %v", e) }
// case nil: t.Logf("Backup still has %v pages of %v to copy to %v", report.Remaining, report.PageCount, report.Target)
}
}
return closed(*r)
return !ok
}

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

0 comments on commit 0f3e536

Please sign in to comment.