Stop using reload_module

Bug #1718803 reported by Tim Burke
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
New
Undecided
Unassigned

Bug Description

We only use it in tests, but it can still cause headaches. For example, https://review.openstack.org/#/c/506002/ had some test failures that included output like

    First differing element 0:
    ShardRange<1a to 1z as of 0000000001.00000>
    ShardRange<1a to 1z as of 0000000001.00000>

which was strange since ShardRange.__eq__ is just

    if not isinstance(other, ShardRange):
        return False
    return self.lower == other.lower and self.upper == other.upper

Turned out, neither self nor other was actually an instance of ShardRange! ShardRange's id changed as a result of the reload.

https://review.openstack.org/#/c/506410/ gets us out of that particular hole, but reload_module is still being used in test_db_replicator and test_manager -- we should clean them up, as well.

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.