I have been seeing empty cookie files on travis infrastructure, but couldn't reproduce the issue locally. I assume it takes a bit longer to flush the file on travis. Thus, a sleep should work around that.
[qa] util: Poll cookie file size before reading #11129
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1708-qaPollCookie changing 1 files +9 −4-
MarcoFalke commented at 9:13 PM on August 24, 2017: member
-
[qa] util: Poll cookie file size before reading fabfeaee6d
- MarcoFalke added the label Tests on Aug 24, 2017
-
in test/functional/test_framework/util.py:253 in fabfeaee6d
252 | - with open(os.path.join(datadir, "regtest", ".cookie"), 'r') as f: 253 | + if os.path.isfile(file_cookie): 254 | + while os.path.getsize(file_cookie) != len('__cookie__:') + 64: 255 | + # Wait for the file to be flushed 256 | + time.sleep(0.05) 257 | + with open(file_cookie, 'r') as f:
laanwj commented at 10:22 AM on August 25, 2017:Concept ACK, though I don't like doing this polling in
get_auth_cookieitself - my preference would be to throw aAuthCookieIncompleteerror or such, catch that inwait_for_rpc_connectionand keep the polling restricted to there.Edit: it could even just raise
ValueError("No RPC credentials")- that's already checked for in that loop.laanwj referenced this in commit 43e7dcbcf0 on Aug 25, 2017MarcoFalke closed this on Aug 25, 2017MarcoFalke deleted the branch on Aug 25, 2017laanwj referenced this in commit e413f1dc28 on Aug 25, 2017laanwj referenced this in commit 82dd7195e1 on Aug 25, 2017laanwj referenced this in commit c7229ac36e on Aug 28, 2017MarcoFalke referenced this in commit b278a43646 on Oct 3, 2017HashUnlimited referenced this in commit 8958465398 on Mar 9, 2018PastaPastaPasta referenced this in commit 2f12d50751 on Sep 19, 2019PastaPastaPasta referenced this in commit 900c6ae316 on Sep 23, 2019PastaPastaPasta referenced this in commit 126034e9dc on Sep 24, 2019codablock referenced this in commit 6ec77c0a71 on Sep 25, 2019barrystyle referenced this in commit e856e38ff4 on Jan 22, 2020DrahtBot locked this on Sep 8, 2021
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me