Comment 2 for bug 1814177

Revision history for this message
Matt Riedemann (mriedem) wrote :

The difference since that bug was fixed is the check here:

https://review.openstack.org/#/c/564092/16/nova/tests/functional/notification_sample_tests/test_instance.py@1348

We're already checking the size of the list, but we are accepting anything less than or equal to 7:

        # Seven versioned notifications are generated. We only rely on the
        # first six because _wait_until_swap_volume_error will return True
        # after volume_api.unreserve is called on the cinder fixture, and that
        # happens before the instance fault is handled in the compute manager
        # which generates the last notification (compute.exception).
        # 0. instance-create-start
        # 1. instance-create-end
        # 2. instance-update
        # 3. instance-volume_attach-start
        # 4. instance-volume_attach-end
        # 5. instance-volume_swap-start
        # 6. instance-volume_swap-error
        # 7. compute.exception
        self.assertLessEqual(7, len(fake_notifier.VERSIONED_NOTIFICATIONS),
                             'Unexpected number of versioned notifications. '
                             'Got: %s' % fake_notifier.VERSIONED_NOTIFICATIONS)