Closed wearpants closed 10 years ago
would running haveged in the test environment be enough of a solution?
Cool, that did the trick :-). I'll make a note in the docs
Additionally, you could consider using a smaller key size (say RSA-1024) for tests only. These are much faster to generate than 2048 or 4096 bit keys. We do this for the Securedrop unit tests.
Generating a keypair in tests is extremely slow. This is related to #18 & #23.
Ideally, we reduce # of tests that generate keys in the first place. At a quick glance, the only test that seems to require generating a new key is
GnuPGTest.test_gen_key
.Key generation is slow b/c the kernel lacks entropy (this is often a problem on servers & VMs without a lot of I/O). Possible approaches:
find /
in a background process to thrash the disk. Ick.Alternately, the slow tests could be moved to a separate file, so that they can be run selectively.