Still intermittent test failures in test_wait_script_waits_for_lldpd
Bug #1293942 reported by
Jeroen T. Vermeulen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Gavin Panella |
Bug Description
This is the Son of Bug 1283918. Sometimes TestLLDPScripts
_StringException: Traceback (most recent call last):
File "src/metadatase
time.
….
MismatchError: Expected to be called once. Called 250 times.
The actual number varies. We already reduced the window for accidental calls, but still this problem occurs.
Download link to full test output: https:/
Related branches
lp://qastaging/~allenap/maas/intermittent-lldpd-test--bug-1293942
- Raphaël Badin (community): Approve
-
Diff: 104 lines (+49/-3)2 files modifiedsrc/maasserver/testing/testcase.py (+44/-1)
src/metadataserver/models/tests/test_commissioningscript.py (+5/-2)
Changed in maas: | |
status: | Triaged → In Progress |
assignee: | nobody → Gavin Panella (allenap) |
Changed in maas: | |
status: | In Progress → Fix Committed |
milestone: | none → 14.04 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This happens for me once every few hundred times the test runs. Besides the one expected call to time.sleep, the injected Mock reports hundreds of additional calls, with a timeout of 0.1 seconds. It doesn't seem to be anything in our codebase as such.
The extra calls seem to be coming from Crochet. When I inject an error into the additional time.sleep calls (but not the ones the call expects), I find this:
Exception in thread Thread-1: python2. 7/threading. py", line 810, in __bootstrap_inner bdist.linux- x86_64/ egg/crochet/ _shutdown. py", line 28, in run
Traceback (most recent call last):
File "/usr/lib/
self.run()
File "build/
time.sleep(0.1)
Patching is of course not thread-safe. It's a wonder this isn't affecting more tests. We can probably work around the failure for now by importing the sleep function from time, instead of importing the time module and using its sleep function.