Code review comment for lp:~allenap/maas/case-compare-mac--bug-1558635

Revision history for this message
Gavin Panella (allenap) wrote :

I think this hit a 1 in 10000 error here where the PID randomly chosen
by the object factory collided with an existing PID. I've updated the
factory function to use successive PIDs from a cycling generator instead
of random integers.

ERROR: maasserver.triggers.tests.test_system_listener.TestCoreRegionRackRPCConnectionInsertListener.test_rebalance_doesnt_happen_when_less_than_half_conn
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/tmp/tarmac/branch.mpRa89/src/maastesting/runtest.py", line 121, in _run_user
    result = function(*args, **kwargs)
  File "/home/ubuntu/.buildout/eggs/testtools-2.1.0-py3.5.egg/testtools/testcase.py", line 714, in _run_test_method
    return self._get_test_method()()
  File "/usr/lib/python3/dist-packages/crochet/_eventloop.py", line 461, in wrapper
    return eventual_result.wait(timeout)
  File "/usr/lib/python3/dist-packages/crochet/_eventloop.py", line 231, in wait
    result.raiseException()
  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 368, in raiseException
    raise self.value.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1126, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/tmp/tarmac/branch.mpRa89/src/maasserver/triggers/tests/test_system_listener.py", line 349, in test_rebalance_doesnt_happen_when_less_than_half_conn
    "region": region,
django.core.exceptions.ValidationError: {'__all__': ['Region controller process with this Region and Pid already exists.']}

« Back to merge proposal