mozilla-services/mozservices — pull request #9 by rfk (2012-03-12 19:15:45+00:00)
Title: Ensure that secrets can't be added more than once per second.

The secrets file format only supports one-second resolution, so if you add secrets in quick succession they can get saved/loaded in the wrong order. This was causing sporadic test failures.

This patch causes secrets.add() to fail if you call it in quick succession. Seemed safer than trying to futz the secrets so it succeeds in this never-going-to-happen-in-production case.