Closed mceachen closed 1 year ago
@JoshuaWise this is blocking the upgrade to SQLite 3.43.
Closing this in favor of https://github.com/WiseLibs/better-sqlite3/commit/6ee3399932c73c0f34d1b2e604d50b44a4e94f6f. This is also related to https://github.com/WiseLibs/better-sqlite3/issues/597. I've enabled the long-overdue HAVE_USLEEP=1
compile-time option, which allows the timeout option to be more granular. It turns out that when enabling HAVE_USLEEP=1
, the CLI builds for macos-latest
take much longer than expected. After investigating, the test times were always 2x-3x the specified timeout. For example, if the timeout was 200ms, it would take 400-600ms; if the timeout was 1000ms, it would take 2000-3000ms. The behavior is quite mysterious, but I can't reproduce it on my local MacOS machine, so I assume it could have something to do with GitHub Actions de-prioritizing virtual machines that are idle. Anyways, it works as intended on all real machines I test it on, so I don't think it's a big deal. In any case, timeouts are never exact in programming—they are always best-effort/minimum times anyways.
This should allow the upgrade to 3.43 to pass:
Failure from GHA:
https://github.com/WiseLibs/better-sqlite3/actions/runs/5965363532/job/16186656443?pr=1050