Skip to content

Commit

Permalink
gpio: avoid possible race condition in button test
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Apr 27, 2017
1 parent 3aa0cf5 commit e3ca19e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpio/button_driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ func TestButtonDriverStart(t *testing.T) {
sem <- true
})

d.halt <- true

a.TestAdaptorDigitalRead(func() (val int, err error) {
val = 1
return
})

d.halt <- true

select {
case <-sem:
t.Errorf("Button Event \"Press\" should not published")
Expand Down

0 comments on commit e3ca19e

Please sign in to comment.