datatracker icon indicating copy to clipboard operation
datatracker copied to clipboard

transient random name failure

Open ietf-svn-bot opened this issue 3 years ago • 11 comments

type_defect | by [email protected]


FAIL: test_group_about_personnel (ietf.group.tests_info.GroupPagesTests.test_group_about_personnel)
Correct personnel should appear on the group About page
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rjsparks/ietf/datatracker/rjs/7.27.1.dev0/ietf/group/tests_info.py", line 350, in test_group_about_personnel
    self.assertContains(r, role.person.plain_name())
  File "/Users/rjsparks/ietf/datatracker/rjs/7.27.1.dev0/env/lib/python3.7/site-packages/django/test/testcases.py", line 454, in assertContains
    self.assertTrue(real_count != 0, msg_prefix + "Couldn't find %s in response" % text_repr)
AssertionError: False is not true : Couldn't find 'Mitchel O'Cadden' in response

Issue migrated from trac:3231 at 2022-03-04 08:14:05 +0000

ietf-svn-bot avatar Mar 09 '21 22:03 ietf-svn-bot

@[email protected] changed status from new to accepted

ietf-svn-bot avatar Mar 15 '21 18:03 ietf-svn-bot

@[email protected] commented


====================================================================== FAIL: test_api_upload_bluesheet (ietf.api.tests.CustomApiTests.test_api_upload_bluesheet)

Traceback (most recent call last): File "/home/rjsparks/ietf/datatracker/trunk/ietf/api/tests.py", line 245, in test_api_upload_bluesheet self.assertIn(html.escape(p['affiliation']), text) AssertionError: 'Mullin, O'Gowan and McGloin' not found in 'Bluesheet for IETF-82: acronym7 Sat-1100\n========================================================================\n\n6 attendees.\n\n\nAndrea Andreotti\tAzienda\nBosse Bernadotte\tBolaget AB\nCharles Charlemagne\tCompagnie\nMathilde Deschamps de Martinez\tRousset\nChristine Meara\tMullin, O'Gowan and McGloin\nPari Tara\tKar-Sengupta\n'

ietf-svn-bot avatar Jun 24 '21 20:06 ietf-svn-bot

@[email protected] commented


escape failure

======================================================================
FAIL: test_api_upload_bluesheet (ietf.api.tests.CustomApiTests.test_api_upload_bluesheet)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rjsparks/ietf/datatracker/rjs/7.35.1.dev0/ietf/api/tests.py", line 245, in test_api_upload_bluesheet
    self.assertIn(html.escape(p['affiliation']), text)
AssertionError: 'שמעון-ח'טיב' not found in 'Bluesheet for IETF-82: acronym7  Thu-1100\n========================================================================\n\n6 attendees.\n\n\nAndrea Andreotti\tAzienda\nBosse Bernadotte\tBolaget AB\nCharles Charlemagne\tCompagnie\nעומר דמרי\tשמעון-ח'טיב\nΑιμιλία Κυριαννάκη\tΚρεμμύδας LLC\nІрина Затула\tШвачка, Бабиченко and Дробаха\n'

----------------------------------------------------------------------

ietf-svn-bot avatar Sep 15 '21 14:09 ietf-svn-bot

====================================================================== FAIL: test_reject_reviewer_assignment (ietf.doc.tests_review.ReviewTests.test_reject_reviewer_assignment)

Traceback (most recent call last): File "/workspace/ietf/doc/tests_review.py", line 416, in test_reject_reviewer_assignment self.assertContains(r, assignment.reviewer.person.name) File "/home/dev/.local/lib/python3.9/site-packages/django/test/testcases.py", line 454, in assertContains self.assertTrue(real_count != 0, msg_prefix + "Couldn't find %s in response" % text_repr) AssertionError: False is not true : Couldn't find 'Tane O'Connor' in response

rjsparks avatar Sep 26 '22 17:09 rjsparks

Author extraction failure. Author name used in test: नम्रता Author ascii name: Nmrtaa Author initials:

====================================================================== FAIL: test_submit_existing_txt_preserve_authors (ietf.submit.tests.SubmitTests.test_submit_existing_txt_preserve_authors)

Traceback (most recent call last): File "/workspace/ietf/submit/tests.py", line 722, in test_submit_existing_txt_preserve_authors self.submit_existing(["txt"], change_authors=False) File "/workspace/ietf/submit/tests.py", line 573, in submit_existing status_url, author = self.do_submission(name, rev, group, formats, author=prev_author.person) File "/workspace/ietf/submit/tests.py", line 218, in do_submission self.assertEqual(len(submission.authors), 1) AssertionError: 0 != 1

rjsparks avatar Sep 30 '22 14:09 rjsparks

Is it possible to make the test runs repeatable, so these rare events can be more easily reproduced when they happen? I think you said in the past that the random seed for a run is being saved somewhere, but I don't know how one would start a new run with this seed, and whether that would actually cause the exact same sequence of events to happen.

larseggert avatar Oct 14 '22 07:10 larseggert

I think that would be fantastic. It might be a bit nontrivial to track down the places we need to seed - I know we import random and use it in a number of factories as well as letting the faker library give us randomness. I'd think it's tractable, though.

jennifer-richards avatar Oct 14 '22 13:10 jennifer-richards

Yes, we should add that infrastructure, BUT, for many of the above tests, the name that broke things is readily available, and the test can be run with just that name explicitly, so there's no need to wait for the ability to start with the same random state to make a lot of this better.

rjsparks avatar Oct 14 '22 13:10 rjsparks

How do you run a single test with chosen input?

larseggert avatar Oct 14 '22 20:10 larseggert

Temporarily change the place that builds the data for the test to only provide the specific input you want.

rjsparks avatar Oct 14 '22 21:10 rjsparks

fu

hibitchbye avatar Oct 21 '22 17:10 hibitchbye

FAIL: test_group_about_personnel (ietf.group.tests_info.GroupPagesTests.test_group_about_personnel)

This one was fixed as part of 6ca6c35186bf42abf6b971691492f6d4be3428d1.

larseggert avatar Nov 05 '22 11:11 larseggert

FAIL: test_api_upload_bluesheet (ietf.api.tests.CustomApiTests.test_api_upload_bluesheet)

This one was fixed as part of cf629a42ad53343734843a41e5db829d8aa1522b.

larseggert avatar Nov 05 '22 11:11 larseggert

FAIL: test_reject_reviewer_assignment (ietf.doc.tests_review.ReviewTests.test_reject_reviewer_assignment)

This will be fixed by #4695.

larseggert avatar Nov 05 '22 11:11 larseggert

#4695 claims to have fixed this, but I think

FAIL: test_submit_existing_txt_preserve_authors (ietf.submit.tests.SubmitTests.test_submit_existing_txt_preserve_authors)

may have a problem. Was that fixed yet?

jennifer-richards avatar Nov 24 '22 16:11 jennifer-richards

Looking into it. One issue I found is #4798, but that is not causing that particular failure.

larseggert avatar Nov 25 '22 11:11 larseggert

Another issue is that single-word names aren't handled correctly. I have a PR (#4799) pending for that.

larseggert avatar Nov 25 '22 16:11 larseggert

Has anyone seen more issues?

larseggert avatar Dec 12 '22 17:12 larseggert

I haven't seen one of these in a while

jennifer-richards avatar Dec 12 '22 17:12 jennifer-richards

We can start opening an issue per occurrence since these are becoming more rarified

rjsparks avatar Dec 12 '22 19:12 rjsparks