From 1ad27c2924e8a57b17bbac7907ce70d76b3e2b0c Mon Sep 17 00:00:00 2001 From: SoulKa Date: Tue, 16 Jan 2024 14:44:57 +0100 Subject: [PATCH] fix read timeout test --- aht20/aht20_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/aht20/aht20_test.go b/aht20/aht20_test.go index 157e584..6eab015 100644 --- a/aht20/aht20_test.go +++ b/aht20/aht20_test.go @@ -9,7 +9,6 @@ import ( "periph.io/x/conn/v3/i2c/i2ctest" "periph.io/x/conn/v3/physic" "testing" - "time" ) const byteStatusInitialized = bitInitialized | 0x10 @@ -139,10 +138,10 @@ func TestDev_Sense_error(t *testing.T) { }, { name: "read timeout", - data: []byte{byteStatusInitialized, 0x75, 0x52, 0x05, 0x8E, 0x40, 0x7F}, + data: []byte{bitInitialized | bitBusy, 0x75, 0x52, 0x05, 0x8E, 0x40, 0x16}, opts: Opts{ MeasurementReadTimeout: 1, - MeasurementWaitInterval: 10 * time.Millisecond, + MeasurementWaitInterval: -1, ValidateData: true, }, error: &ReadTimeoutError{1},