I noticed something unfortunate when running the tests. Here's what I did:
- I accidentally had another instance of Forester already running.
- I ran the tests. They failed because they could not bind port 8080 (
Fatal error: exception Unix.Unix_error(Unix.EADDRINUSE, "bind", "")). - I killed my other process, and ran the tests again. The results were cached rather than running again.
- I tried running
dune runtest --forceand it had no impact. It still uses the cached results.
Basically, caching is not suitable for cram tests because they depend on the environment. We should find a way to ensure that the cram tests always run every time.
It looks like
dune cleanwill get rid of the cache. God, I hate the OCaml ecosystem so much. It's so crazy thatdune runtest --forcedoes not do what it says it does.