diff --git a/tests/tfa_basic.test b/tests/tfa_basic.test
index 7f9860d80d8dbc6259e09e8f406b016a65a3fd7d..756ababbb12119134cccb2918e6a3a0ac1e7a02e 100644
--- a/tests/tfa_basic.test
+++ b/tests/tfa_basic.test
@@ -267,6 +267,7 @@ class TfaBasicTestCase extends DrupalWebTestCase {
 
     // Set expire time and run cron to delete saved code to log in.
     variable_set('tfa_basic_accepted_code_expiration', '0');
+    sleep(1);
     $this->cronRun();
     $code_form = array(
       'code' => $code,