Projet

Général

Profil

Development #66612

tests: test_exponential_backoff échoue par intermittence

Ajouté par Benjamin Dauvergne il y a presque 2 ans. Mis à jour il y a presque 2 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
-
Début:
24 juin 2022
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

https://jenkins.entrouvert.org/job/authentic/2796/testReport/junit/authentic-py3-dj22-drf39-djtables1211.tests/test_login/test_exponential_backoff/

En échec

authentic-py3-dj22-drf39-djtables1211.tests.test_login.test_exponential_backoff (from (junit.xml))
En échec depuis 1 build (Depuis
#2796 )
A duré 7,2 s.
Message d'erreur

AssertionError: 4
assert 'too many login' in '<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset="utf-8"/>\n    <title>\n  Authentic2 - testserver - Login\n</tit...py; 2013 Entr\'ouvert&nbsp;&mdash;&nbsp;authentic2 4.7.post5+g50c473d9.dirty\n\n  </div>\n\n  \n\n  </body>\n</html>\n'
 +  where '<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset="utf-8"/>\n    <title>\n  Authentic2 - testserver - Login\n</tit...py; 2013 Entr\'ouvert&nbsp;&mdash;&nbsp;authentic2 4.7.post5+g50c473d9.dirty\n\n  </div>\n\n  \n\n  </body>\n</html>\n' = <200 OK text/html body=b'<!DOCTYP...l>\n'/4766>.text

Pile d'exécution

db = None, app = <django_webtest.DjangoTestApp object at 0x7f98c74f2fd0>
settings = <pytest_django.fixtures.SettingsWrapper object at 0x7f98c7845c10>

    def test_exponential_backoff(db, app, settings):
        settings.A2_LOGIN_EXPONENTIAL_RETRY_TIMEOUT_DURATION = 0
        response = app.get('/login/')
        response.form.set('username', '')
        response.form.set('password', 'zozo')
        response = response.form.submit('login-password-submit')
        assert response.status_code == 200

        for i in range(10):
            response.form.set('username', 'zozo')
            response.form.set('password', 'zozo')
            response = response.form.submit('login-password-submit')
            assert 'too many login' not in response.text

        settings.A2_LOGIN_EXPONENTIAL_RETRY_TIMEOUT_DURATION = 1.0
        settings.A2_LOGIN_EXPONENTIAL_RETRY_TIMEOUT_MIN_DURATION = 10.0

        for i in range(10):
            response.form.set('username', 'zozo')
            response.form.set('password', 'zozo')
            response = response.form.submit('login-password-submit')
            if 1.8**i > 10:
                break
            assert 'too many login' not in response.text, '%s' % i
>       assert 'too many login' in response.text, '%s' % i
E       AssertionError: 4
E       assert 'too many login' in '<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset="utf-8"/>\n    <title>\n  Authentic2 - testserver - Login\n</tit...py; 2013 Entr\'ouvert&nbsp;&mdash;&nbsp;authentic2 4.7.post5+g50c473d9.dirty\n\n  </div>\n\n  \n\n  </body>\n</html>\n'
E        +  where '<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset="utf-8"/>\n    <title>\n  Authentic2 - testserver - Login\n</tit...py; 2013 Entr\'ouvert&nbsp;&mdash;&nbsp;authentic2 4.7.post5+g50c473d9.dirty\n\n  </div>\n\n  \n\n  </body>\n</html>\n' = <200 OK text/html body=b'<!DOCTYP...l>\n'/4766>.text

tests/test_login.py:153: AssertionError

Fichiers

Révisions associées

Révision c6badca0 (diff)
Ajouté par Valentin Deniaud il y a presque 2 ans

tests: make exponential backoff test more permissive (#66612)

Historique

#1

Mis à jour par Valentin Deniaud il y a presque 2 ans

  • Assigné à mis à Valentin Deniaud
#2

Mis à jour par Valentin Deniaud il y a presque 2 ans

#3

Mis à jour par Benjamin Dauvergne il y a presque 2 ans

  • Statut changé de Solution proposée à Solution validée
#4

Mis à jour par Valentin Deniaud il y a presque 2 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit c6badca02c4ea2ca05a8f790418e02d959ab6a55
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Thu Jun 23 17:56:47 2022 +0200

    tests: make exponential backoff test more permissive (#66612)
#5

Mis à jour par Transition automatique il y a presque 2 ans

  • Statut changé de Résolu (à déployer) à Solution déployée
#6

Mis à jour par Transition automatique il y a plus d'un an

Automatic expiration

Formats disponibles : Atom PDF