Project

Profile

Help

Issue #1796

closed

unit.server.db.test_connection.TestDatabaseRetryOnInitialConnectionSupport.test_retry_with_max_timeout is non-deterministic

Added by rbarlow about 8 years ago. Updated about 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

This test occasionally fails on my system, but usually passes:

======================================================================
FAIL: test_retry_with_max_timeout (unit.server.db.test_connection.TestDatabaseRetryOnInitialConnectionSupport)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/fedora/.virtualenvs/pulp/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/home/fedora/devel/pulp/server/test/unit/server/db/test_connection.py", line 775, in test_retry_with_max_timeout
    mock_sleep.assert_has_calls([call(1), call(1)])
  File "/home/fedora/.virtualenvs/pulp/lib/python2.7/site-packages/mock.py", line 863, in assert_has_calls
    'Actual: %r' % (calls, self.mock_calls)
AssertionError: Calls not found.
Expected: [call(1), call(1)]
Actual: [call(0.5), call(0.5), call(0.5), call(1)]
-------------------- >> begin captured logging << --------------------
pulp.server.db.connection: INFO: Attempting to connect to localhost:27017
pulp.server.db.connection: DEBUG: Connection Arguments: {'host': 'localhost:27017', 'maxPoolSize': 10}
pulp.server.db.connection: INFO: Could not connect to MongoDB at localhost:27017:

pulp.server.db.connection: ERROR: Could not connect to any of MongoDB seeds at localhost:27017:
... Waiting 1 seconds and trying again.
pulp.server.db.connection: CRITICAL: Database initialization failed: 
--------------------- >> end captured logging << ---------------------

Also available in: Atom PDF