mongodb reconnect test is too slow

Bug #1390680 reported by ZhiQiang Fan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Undecided
ZhiQiang Fan

Bug Description

Ran 3008 tests in 619.459s
PASSED (id=0, skips=216)
Slowest Tests
Test id Runtime (s)
--------------------------------------------------------------------------------------------------------------------------------------- -----------
ceilometer.tests.storage.test_storage_scenarios.MongoAutoReconnectTest.test_mongo_update(mongodb) 10.165
ceilometer.tests.storage.test_storage_scenarios.MongoAutoReconnectTest.test_mongo_find_and_modify(mongodb) 10.157
ceilometer.tests.storage.test_storage_scenarios.MongoAutoReconnectTest.test_mongo_insert(mongodb) 10.149
ceilometer.tests.storage.test_storage_scenarios.MongoAutoReconnectTest.test_mongo_find(mongodb) 10.134
ceilometer.tests.publisher.test_messaging_publisher.TestPublisher.test_published_with_policy_default_sized_queue_and_rpc_down(notifier) 4.976
ceilometer.tests.publisher.test_messaging_publisher.TestPublisher.test_published_with_policy_default_sized_queue_and_rpc_down(rpc) 4.840
ceilometer.tests.storage.test_storage_scenarios.ComplexAlarmHistoryQueryTest.test_alarm_history_with_no_filter_and_limit(sqlite) 3.336
ceilometer.tests.storage.test_storage_scenarios.StatisticsGroupByTest.test_group_by_end_timestamp_before(sqlite) 3.136
ceilometer.tests.ipmi.platform.test_intel_node_manager.TestNonNodeManager.test_read_temperature_all 3.005
ceilometer.tests.storage.test_storage_scenarios.ComplexSampleQueryTest.test_query_complex_filter_with_limit(sqlite) 2.919

This is because retry_interval is default 10 seconds, we need to override that value in unit test, no need to wait for 10 seconds, then we can reduce 36 seconds when we run unittest, yes!!

ZhiQiang Fan (aji-zqfan)
Changed in ceilometer:
assignee: nobody → ZhiQiang Fan (aji-zqfan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

Fix proposed to branch: master
Review: https://review.openstack.org/133351

Changed in ceilometer:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/133351
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=db5b19eaca8adcc2e065cbd01ae3b4a1a208d870
Submitter: Jenkins
Branch: master

commit db5b19eaca8adcc2e065cbd01ae3b4a1a208d870
Author: ZhiQiang Fan <email address hidden>
Date: Sat Nov 8 23:26:51 2014 +0800

    Override retry_interval in MongoAutoReconnectTest

    Currently, retry_interval is only override when class definition,
    that will not work for all unit test cases. This patch fixes this
    issue by putting it to setUp method.

    Note, retry_interval is 0 can still work for retry algorithm, we
    can reduce the time cost to minimum.

    Note, DB2 uses same code as MongoDB for connecting, so if MongoDB
    works, so can DB2. But they are different in many ways, and this
    patch only aims at improving the unit test speed, so DB2 test can
    be discussed and added in another patch.

    Change-Id: I3e5e15b6d2f503ad7fb81875470259508eff988c
    Closes-Bug: #1390680

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.