Server instances not deleted after tempest test methods

Reported by Jay Pipes on 2011-12-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
High
Jay Pipes

Bug Description

Lots of test methods do not clean up after themselves. One example is all the test cases in test_servers* in the tempest test suite that call the servers_client.create_server method but don't clean up that server instance after running into a failure.

What this leads to is lots of the following:

======================================================================
ERROR: The server name should be changed to the the provided value
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/stack/tempest/storm/tests/test_servers.py", line 83, in test_update_server_name
    self.flavor_ref)
  File "/home/stack/tempest/storm/services/nova/json/servers_client.py", line 62, in create_server
    error=body)
CreateServerFailure: Failed to create server. Response status code: 413. API call returned the following: {"overLimit": {"message": "Instance quotas have been exceeded", "code": 413, "retryAfter": 0}}

Since previous test cases had failures and didn't delete server instances that the test case created.

What this means is lots of false negative test case failures.

The solution for this is to have the tearDown() method handle cleanup from failed test cases and have the test methods inform the test class of things the test method creates..

tags: added: testcase
tags: added: compute
tags: removed: testcase
Jay Pipes (jaypipes) wrote :

test_list_images.py has no tearDownClass method to clean up created images and servers.

Jay Pipes (jaypipes) on 2012-01-06
Changed in tempest:
milestone: none → essex-3

Reviewed: https://review.openstack.org/2857
Committed: http://github.com/openstack/tempest/commit/5135bfcea5c3f133a75ac84710610718ba9b36ae
Submitter: Jenkins
Branch: master

commit 5135bfcea5c3f133a75ac84710610718ba9b36ae
Author: Jay Pipes <email address hidden>
Date: Thu Jan 5 15:46:49 2012 -0500

    Rework exceptions in Tempest

    * Add base exception class similar to other OS projects
    * Catch certain HTTP errors and raise exceptions in base
      client classes
    * Fixes LP Bug#899701 by adding tearDownClass() method
      to the test_list_images.ListImagesTest class to destroy
      images and instances the test case creates

    Change-Id: I0f616813539b31da27e5106a59c2ca3765b1919f

Changed in tempest:
status: In Progress → Fix Committed
Jay Pipes (jaypipes) on 2012-07-11
Changed in tempest:
status: Fix Committed → Fix Released
Sean Dague (sdague) on 2013-09-23
Changed in tempest:
milestone: none → havana-3
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers