Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
nakabonne committed Jun 1, 2021
1 parent d6da287 commit 6b70223
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions gui/drawer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ func TestRedrawCharts(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()

ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()

tests := []struct {
name string
storage storage.Reader
Expand Down Expand Up @@ -46,14 +43,14 @@ func TestRedrawCharts(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
d := &drawer{
widgets: &widgets{latencyChart: tt.latencyChart, percentilesChart: tt.percentilesChart},
doneCh: make(chan struct{}),
chartDrawing: atomic.NewBool(false),
storage: tt.storage,
}
go d.redrawCharts(ctx)
close(d.doneCh)
})
}
}
Expand Down

0 comments on commit 6b70223

Please sign in to comment.