Assertion error in delete share server tempest tests

Bug #1546618 reported by Andrew Kerr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Ben Swartzlander

Bug Description

The _delete_share_server method in test_share_servers.py has an assertion error in the server for loop. It is asserting that the share created earlier in the test is a member of the current share server. But if there are multiple share servers, which is a possibility due to share create retry logic, this assert will fail because the share can never be a member of more than one share server. The assert in question is the following on line 241 (as of this bug report):

self.assertTrue(any(share["id"] == s["id"] for s in shares))

This assert seems unnecessary for the goal of the test and can probably be safely removed.

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

Changed in manila:
assignee: nobody → Ben Swartzlander (bswartz)
status: New → In Progress
Changed in manila:
importance: Undecided → Medium
milestone: none → mitaka-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/281534
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=e6c66917ebd5ca988c7497b66f731240c76a9c13
Submitter: Jenkins
Branch: master

commit e6c66917ebd5ca988c7497b66f731240c76a9c13
Author: Ben Swartzlander <email address hidden>
Date: Wed Feb 17 16:30:19 2016 -0500

    Remove aggressive assert from share server test

    The delete_share_server test has an assert which can
    fail in case of retries and give a false negative result.
    This assert isn't necessary to check for correctness, so
    remove it.

    Closes-bug: 1546618

    Change-Id: Ib04afdc222e19725df4da0793c1ffcc15282a772

Changed in manila:
status: In Progress → Fix Released
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.