ensure servers are deleted between tests

Possible fix for bug #1079687

When running tests we create a lot of servers, and do delete
calls at the end of tests. However delete is an async action,
so the previous servers will often be hanging around after our
tests. In memory constrained environments like the OpenStack CI
system if deletes happen too slowly we hit the memory limits,
nova scheduler can no longer schedule VMs, and the tests get flakey.

This *may* fix the periodic fails we've seen on tempest in nova.

Pair programmed with Matt Treinish <treinish@linux.vnet.ibm.com>

Change-Id: I1f93ac26064c68bf529e2efa1bf0c35e1f4e7d2c
diff --git a/tempest/tests/compute/servers/test_servers.py b/tempest/tests/compute/servers/test_servers.py
index e7a8ec7..fcf9975 100644
--- a/tempest/tests/compute/servers/test_servers.py
+++ b/tempest/tests/compute/servers/test_servers.py
@@ -166,9 +166,27 @@
         super(ServersTestJSON, cls).setUpClass()
         cls.client = cls.servers_client
 
+    def tearDown(self):
+        # clean up any remaining servers and wait for them to fully
+        # delete. This is done because delete calls are async, and if
+        # deletes are running slow we could very well overrun system
+        # memory
+        self.clear_servers()
+
+        super(ServersTestJSON, self).tearDown()
+
 
 class ServersTestXML(base.BaseComputeTestXML, ServersTestBase):
     @classmethod
     def setUpClass(cls):
         super(ServersTestXML, cls).setUpClass()
         cls.client = cls.servers_client
+
+    def tearDown(self):
+        # clean up any remaining servers and wait for them to fully
+        # delete. This is done because delete calls are async, and if
+        # deletes are running slow we could very well overrun system
+        # memory
+        self.clear_servers()
+
+        super(ServersTestXML, self).tearDown()