### Eclipse Workspace Patch 1.0
#P simpletest
Index: drupal_test_case.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/drupal_test_case.php,v
retrieving revision 1.70
diff -u -r1.70 drupal_test_case.php
--- drupal_test_case.php	27 Mar 2008 20:54:40 -0000	1.70
+++ drupal_test_case.php	29 Mar 2008 21:07:09 -0000
@@ -394,6 +394,9 @@
         db_drop_table($ret, $name);
       }
       $db_prefix = $this->db_prefix_original;
+      $this->_logged_in = FALSE;
+      $this->_modules = $this->_originalModules;
+      $this->curlClose();
       return;
     }
     if ($this->_modules != $this->_originalModules) {
@@ -514,6 +517,13 @@
     return $this->_content;
   }
 
+  protected function curlClose() {
+    if (isset($this->ch)) {
+      curl_close($this->ch);
+      unset($this->ch);
+    }
+  }
+
   protected function parse() {
     if (!$this->elements) {
       // DOM can load HTML soup. But, HTML soup can throw warnings, supress
