test_connect_put_node_timeout failed in gate/check job
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
See: http://
2014-04-04 11:34:31.587 | =======
2014-04-04 11:34:31.587 | FAIL: test_connect_
2014-04-04 11:34:31.588 | -------
2014-04-04 11:34:31.588 | Traceback (most recent call last):
2014-04-04 11:34:31.588 | File "/home/
2014-04-04 11:34:31.588 | self.assertTrue(res is None)
2014-04-04 11:34:31.589 | AssertionError: False is not true
2014-04-04 11:34:31.589 | 'False is not true' = self._formatMes
2014-04-04 11:34:31.589 | >> raise self.failureExc
2014-04-04 11:34:31.590 |
It looks like the "slow_connect" option for FakeConn adds a sleep delay of 0.1, which is the same value for the connect_timeout used by the test. It is possible that the two timeouts end up having the same time value, such that in some queue the connect timeout fires after the sleep() timeout, allowing the connection to be "made". However, there is little evidence to support this.
Changed in swift: | |
status: | Fix Committed → Fix Released |
milestone: | none → 2.0.0 |
Reviewed: https:/ /review. openstack. org/85457 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=9d0067a0f54 6ce8a0fddb25765 5f2944c05e35e6
Committed: https:/
Submitter: Jenkins
Branch: master
commit 9d0067a0f546ce8 a0fddb257655f29 44c05e35e6
Author: Peter Portante <email address hidden>
Date: Fri Apr 4 15:26:32 2014 -0400
Attempt to ensure connect always timesout
It seems that the test_connect_ put_timeout( ) test does not always fail
when it is expected. Sometimes, not very often, the attempt to connect
succeeds, resulting in a failed test.
This might be because the fake-connection infrastructure uses a
sleep(0.1) and the test uses a connect timeout of 0.1. There might be a
case where the two values result in the exact time where the entries
happen to be added in the wrong order such that the sleep() completes
first before the connect timeout fires, where the connect completes
successfully.
Closes bug 1302781
Change-Id: Ie23e40cf294170 eccdf0713e313f9 a31a92f9071