Page MenuHomePhabricator

Tests in Tracker fail from time to time from non-obvious reason
Open, LowPublic

Description

Typical modus operandi is AssertionError: Response didn't redirect as expected: Response code was 403 (expected 302), see the example for details.

Example test failure

17:02:08 ======================================================================
17:02:08 FAIL: test_ticket_edit (trackersite.tracker.tests.TicketEditTests)
17:02:08 ----------------------------------------------------------------------
17:02:08 Traceback (most recent call last):
17:02:08   File "/src/trackersite/tracker/tests.py", line 654, in test_ticket_edit
17:02:08     self.assertRedirects(response, reverse('ticket_detail', kwargs={'pk': ticket.id}))
17:02:08   File "/src/.tox/jenkins/local/lib/python2.7/site-packages/django/test/testcases.py", line 283, in assertRedirects
17:02:08     (response.status_code, status_code))
17:02:08 AssertionError: Response didn't redirect as expected: Response code was 403 (expected 302)

Event Timeline

Urbanecm renamed this task from Tests in Tracker do fail from time to time from non-obvious reason to Tests in Tracker fail from time to time from non-obvious reason.Oct 18 2018, 6:15 AM

There is another reason why a test failed:

06:11:35 ======================================================================
06:11:35 FAIL: test_ticket_edit (trackersite.tracker.tests.TicketEditTests)
06:11:35 ----------------------------------------------------------------------
06:11:35 Traceback (most recent call last):
06:11:35   File "/src/trackersite/tracker/tests.py", line 746, in test_ticket_edit
06:11:35     self.assertRedirects(response, reverse('ticket_detail', kwargs={'pk':ticket.id}))
06:11:35   File "/src/.tox/jenkins/local/lib/python2.7/site-packages/django/test/testcases.py", line 283, in assertRedirects
06:11:35     (response.status_code, status_code))
06:11:35 AssertionError: Response didn't redirect as expected: Response code was 403 (expected 302)

(https://gerrit.wikimedia.org/r/c/wikimedia-cz/tracker/+/468051)

Change 468223 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[wikimedia-cz/tracker@master] Revert "Cover statutory declarations with tests"

https://gerrit.wikimedia.org/r/468223

Change 469888 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[wikimedia-cz/tracker@master] Remove temporarily some tests to try to workaround a bug in tests

https://gerrit.wikimedia.org/r/469888

Change 469888 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Remove temporarily some tests to try to workaround a bug in tests

https://gerrit.wikimedia.org/r/469888

Change 468223 abandoned by Urbanecm:
Revert "Cover statutory declarations with tests"

Reason:
superseded by https://gerrit.wikimedia.org/r/c/wikimedia-cz/tracker/ /469888

https://gerrit.wikimedia.org/r/468223

Change 470640 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[wikimedia-cz/tracker@master] [bugfix] Do not save preexpeditures if ticket has 'content' ack

https://gerrit.wikimedia.org/r/470640

Change 470640 merged by jenkins-bot:
[wikimedia-cz/tracker@master] [bugfix] Do not save (pre)expeditures if they are None

https://gerrit.wikimedia.org/r/470640

The first part of issue was fixed by 470640. Updated description to match the new error.

Change 473141 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[wikimedia-cz/tracker@master] Revert "Remove temporarily some tests to try to workaround a bug in tests"

https://gerrit.wikimedia.org/r/473141

Change 473141 abandoned by Urbanecm:
Revert "Remove temporarily some tests to try to workaround a bug in tests"

https://gerrit.wikimedia.org/r/473141

Urbanecm lowered the priority of this task from High to Low.Dec 9 2018, 10:00 PM

Not high priority anymore, as it doesn't break anything.