diff options
author | Erik Verbruggen <erik@verbruggen.consulting> | 2021-12-08 17:23:32 +0300 |
---|---|---|
committer | Erik Verbruggen <Erik.Verbruggen@Me.com> | 2021-12-09 15:28:23 +0300 |
commit | 108fcadce3a87dbf26abdb0126ed21298d2bdd69 (patch) | |
tree | a7391d1a4e4e49b6481b402b58a0827bd260c64a /changelog | |
parent | b7e25e3f26785c3e3667471539234e5d4bafef9f (diff) |
Support dehydrated files in autotests
When creating the local state, check if files are hydrated or not.
If not hydrated, don't read the file: the OS will trigger a
download. This is bad: first the read will fail, because the test is
running on the main thread, the same place where work from callbacks
from the OS get handled. This will result in a time-out for the OS,
and it will return 0 bytes read. So the size for the file in our
local state is set to zero bytes, which makes the comparisson with
the remote state fail, which in turn makes the comparisson fail.
Worse: the callbacks from the system do come in, and are emitted as
a _QueuedConnection_. So when another call to `syncOnce` is made,
the queued downloads will be done, and the file will be re-hydrated,
thus changing the state of the files on disk.
Diffstat (limited to 'changelog')
0 files changed, 0 insertions, 0 deletions