Updated Branches:
  refs/heads/master 55db2fe6d -> 22bda5c3c

ConfigurationServerImplTest: remove long running test

The getBase64KeystoreZillionTimes is not required for the current
implementation that closes the file descriptor cleanly.

Signed-off-by: Prasanna Santhanam <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/22bda5c3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/22bda5c3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/22bda5c3

Branch: refs/heads/master
Commit: 22bda5c3c960e1e6897b3b0aaacdf91add97976d
Parents: 55db2fe
Author: Prasanna Santhanam <[email protected]>
Authored: Mon Jun 3 14:48:29 2013 +0530
Committer: Prasanna Santhanam <[email protected]>
Committed: Mon Jun 3 14:48:29 2013 +0530

----------------------------------------------------------------------
 .../cloud/server/ConfigurationServerImplTest.java  |   23 ++-------------
 1 files changed, 3 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/22bda5c3/server/test/com/cloud/server/ConfigurationServerImplTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/server/ConfigurationServerImplTest.java 
b/server/test/com/cloud/server/ConfigurationServerImplTest.java
index fd4bf03..6e1f4f9 100644
--- a/server/test/com/cloud/server/ConfigurationServerImplTest.java
+++ b/server/test/com/cloud/server/ConfigurationServerImplTest.java
@@ -16,13 +16,13 @@
 // under the License.
 package com.cloud.server;
 
-import java.io.File;
-import java.io.IOException;
-
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.io.FileUtils;
 import org.junit.Test;
 
+import java.io.File;
+import java.io.IOException;
+
 public class ConfigurationServerImplTest {
     final static String TEST = "the quick brown fox jumped over the lazy dog";
 
@@ -58,21 +58,4 @@ public class ConfigurationServerImplTest {
             temp.delete();
         }
     }
-
-    @Test
-    public void testGetBase64KeystoreZillionTimes() throws IOException {
-        File temp = File.createTempFile("keystore", "");
-        try {
-            // may cause IOException with the original implementation because 
of too many open files
-            for (int i = 0; i < 100000; i++) {
-                FileUtils.writeStringToFile(temp, 
Base64.encodeBase64String(TEST.getBytes()));
-                final String keystore = 
ConfigurationServerImpl.getBase64Keystore(temp.getPath());
-                // let's decode it to make sure it makes sense
-                Base64.decodeBase64(keystore);
-            }
-        } finally {
-            temp.delete();
-        }
-    }
-
 }

Reply via email to