mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
Skip download speed monitoring unit tests if SNAPD_SKIP_SLOW_TESTS is set. The
test is based on getting the timings right and so it becomes generally
unreliable when running in super slow environment, such as a build VM in OBS,
thus failing like so:
```
[ 2317s] ----------------------------------------------------------------------
[ 2317s] FAIL: store_download_test.go:886: storeDownloadSuite.TestTransferSpeedMonitoringWriterHappy
[ 2317s]
[ 2317s] store_download_test.go:903:
[ 2317s] c.Check(store.Cancelled(ctx), Equals, false)
[ 2317s] ... obtained bool = true
[ 2317s] ... expected bool = false
[ 2317s]
[ 2317s] store_download_test.go:904:
[ 2317s] c.Check(w.Err(), IsNil)
[ 2317s] ... value *store.transferSpeedError = &store.transferSpeedError{Speed:0} ("download too slow: 0.00 bytes/sec")
[ 2317s]
[ 2317s] store_download_test.go:907:
[ 2317s] // we should hit at least 100*5/50 = 10 measurement windows
[ 2317s] c.Assert(w.MeasuredWindowsCount() >= 10, Equals, true, Commentf("%d", w.MeasuredWindowsCount()))
[ 2317s] ... obtained bool = false
[ 2317s] ... expected bool = true
[ 2317s] ... 9
```
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>