mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-25 18:47:22 -06:00
Five XFA tests failed at random on a busy machine. The scripts of an opening or a change share a 3 s wall-clock budget (a click's share 5 s), each script has 1 s or 3 s, and the engine has 10 s to start; under load the tests went past one of them, and the scripts they check were skipped or did not start. Session::with_xfa_time_scale (and Automation::with_xfa_time_scale) multiplies each of these limits for a test; the default stays 1. The script session counts the engine threads it starts on the calling thread (xfa_session::engines_started). The hundreds-of-calculations tests run with the limits raised, and the engine's test now checks that opening starts one engine and a change one more. A new test sets the factor to 0 and checks that the budget skips all 210 calculations and says so. Three more tests that failed the same way under load run with the limits raised.