1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-05-02 22:17:12 +08:00

gpio: avoid possible race condition in button test

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram 2017-04-27 17:19:32 +02:00
parent 3aa0cf5b89
commit e3ca19eaa3

View File

@ -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")