Workaround #2610 for flaky ct submission test. (#2611)
Workaround #2610 for flaky ct submission test. (#2611)

Presently the CA and the ocsp-updater can race on the initial
submission of a certificate to the configured logs. This results
in double submitting certificates. In integration tests with the fake CT
server this manifests as an occasional failure of the
`test_ct_submission` test (Issue #2579).

The race we currently experience is expected to be fixed in
the future by a planned redesign so for now this commit works around the
failure by allowing either the expected number of submissions, or
exactly double the expected. This fixes #2579. The need to fix the
underlying race was captured in #2610.

The workaround was verified by submitting 10 builds to travis, all
succeeded.
lucasallan/boulder,bmw/boulder,jfrazelle/boulder,letsencrypt/boulder,jcjones/boulder,bmw/boulder,ibukanov/boulder,jsha/boulder,jfrazelle/boulder,letsencrypt/boulder,jsha/boulder,jfrazelle/boulder,bmw/boulder,ibukanov/boulder,ibukanov/boulder,jcjones/boulder,lucasallan/boulder,jcjones/boulder,letsencrypt/boulder,jfrazelle/boulder,jcjones/boulder,lucasallan/boulder,jsha/boulder