I had this failure (or is it an error?) during ec2test that I could not reproduce locally, so I disabled the test. Here is the mail.
Tests started at approximately Wed, 03 Jun 2009 15:18:13 UTC
bzr+ssh://bazaar.launchpad.net/%7Elaunchpad-pqm/launchpad/devel/, revision 8513
Failure in test lib/canonical/launchpad/ftests/../doc/emailaddress.txt
Failed doctest test for emailaddress.txt
File "lib/canonical/launchpad/ftests/../doc/emailaddress.txt", line 0
----------------------------------------------------------------------
File "lib/canonical/launchpad/ftests/../doc/emailaddress.txt", line 10, in emailaddress.txt
Failed example:
person = factory.makePerson()
Exception raised:
Traceback (most recent call last):
File "/var/launchpad/test/lib/zope/testing/doctest.py", line 1360, in __run
compileflags, 1) in test.globs
File "<doctest emailaddress.txt[3]>", line 1, in ?
person = factory.makePerson()
File "/var/launchpad/test/lib/lp/testing/factory.py", line 126, in with_default_master_store
return func(*args, **kw)
File "/var/launchpad/test/lib/lp/testing/factory.py", line 238, in makePerson
person = self.makePersonNoCommit(*args, **kwargs)
File "/var/launchpad/test/lib/lp/testing/factory.py", line 126, in with_default_master_store
return func(*args, **kw)
File "/var/launchpad/test/lib/lp/testing/factory.py", line 292, in makePersonNoCommit
hide_email_addresses=hide_email_addresses)
File "/var/launchpad/test/lib/lp/registry/model/person.py", line 2400, in createPersonAndEmail
comment=comment, registrant=registrant, account=account)
File "/var/launchpad/test/lib/lp/registry/model/person.py", line 2439, in _newPerson
account_id = account.id
File "/var/launchpad/test/lib/storm/properties.py", line 60, in __get__
return obj_info.variables[column].get()
File "/var/launchpad/test/lib/storm/store.py", line 866, in _resolve_lazy_value
self.flush()
File "/var/launchpad/test/lib/storm/store.py", line 484, in flush
self._flush_one(obj_info)
File "/var/launchpad/test/lib/storm/store.py", line 521, in _flush_one
result = self._connection.execute(expr)
File "/var/launchpad/test/lib/storm/databases/postgres.py", line 251, in execute
result = Connection.execute(self, Returning(statement), params)
File "/var/launchpad/test/lib/storm/database.py", line 200, in execute
raw_cursor = self.raw_execute(statement, params)
File "/var/launchpad/test/lib/storm/databases/postgres.py", line 267, in raw_execute
return Connection.raw_execute(self, statement, params)
File "/var/launchpad/test/lib/storm/database.py", line 282, in raw_execute
self._check_disconnect(raw_cursor.execute, *args)
File "/var/launchpad/test/lib/storm/database.py", line 325, in _check_disconnect
return function(*args, **kwargs)
File "/var/launchpad/test/lib/canonical/ftests/pgsql.py", line 106, in execute
return self.real_cursor.execute(*args, **kwargs)
IntegrityError: duplicate key value violates unique constraint "account_pkey"
This test failed in the LaunchpadFactor y.makePerson( ), the test has not done anything other than a PersonSet. The path is executed 1000s of times each test run and we have not seen this fault. I really doubt this is an issue with the test. The makePerson() rules were changed in 2010. I believe we should enable this test again.