Files
Maciej Borzecki 02f4e53585 store: conditionally skip download monitoring unit tests
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>
2024-04-05 09:16:25 +02:00
..
2020-09-27 23:38:17 +02:00
2020-03-30 20:29:29 +02:00