Prevent init_host test to interfere with other tests
The test_migrate_disk_and_power_off_crash_finish_revert_migration test
needs to simulate a compute host crash at a certain point. It stops the
execution at a certain point by injecting a sleep then simulating a
compute restart. However the sleep is just 30 seconds which allows the
stopped function to return while other functional tests are running in
the same test worker process making those tests fail in a weird way.
One simple solution is to add a big enough sleep to the test that will
never return before the whole functional test execution. This patch
proposes a million seconds which is more than 277 hours. Similar to how
the other test in this test package works. This solution is hacky but
simple. A better solution would be to further enhance the capabilities
of the functional test env supporting nova-compute service crash / kill
+ restart.
Reviewed: https:/ /review. opendev. org/675553 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=f875c9d12fa 03e1eb0d6ac0f3d d95f502ae1e6a1
Committed: https:/
Submitter: Zuul
Branch: master
commit f875c9d12fa03e1 eb0d6ac0f3dd95f 502ae1e6a1
Author: Balazs Gibizer <email address hidden>
Date: Fri Aug 9 09:53:45 2019 +0200
Prevent init_host test to interfere with other tests
The test_migrate_ disk_and_ power_off_ crash_finish_ revert_ migration test
needs to simulate a compute host crash at a certain point. It stops the
execution at a certain point by injecting a sleep then simulating a
compute restart. However the sleep is just 30 seconds which allows the
stopped function to return while other functional tests are running in
the same test worker process making those tests fail in a weird way.
One simple solution is to add a big enough sleep to the test that will
never return before the whole functional test execution. This patch
proposes a million seconds which is more than 277 hours. Similar to how
the other test in this test package works. This solution is hacky but
simple. A better solution would be to further enhance the capabilities
of the functional test env supporting nova-compute service crash / kill
+ restart.
Change-Id: Ib0d142806804e9 113dd61d3a7ec15 a98232775c8
Closes-Bug: #1839515