Skip to content

Commit 22bda5c

Browse files
author
Prasanna Santhanam
committed
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 <tsp@apache.org>
1 parent 55db2fe commit 22bda5c

1 file changed

Lines changed: 3 additions & 20 deletions

File tree

‎server/test/com/cloud/server/ConfigurationServerImplTest.java‎

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
// under the License.
1717
package com.cloud.server;
1818

19-
import java.io.File;
20-
import java.io.IOException;
21-
2219
import org.apache.commons.codec.binary.Base64;
2320
import org.apache.commons.io.FileUtils;
2421
import org.junit.Test;
2522

23+
import java.io.File;
24+
import java.io.IOException;
25+
2626
public class ConfigurationServerImplTest {
2727
final static String TEST = "the quick brown fox jumped over the lazy dog";
2828

@@ -58,21 +58,4 @@ public void testGetBase64Keystore() throws IOException {
5858
temp.delete();
5959
}
6060
}
61-
62-
@Test
63-
public void testGetBase64KeystoreZillionTimes() throws IOException {
64-
File temp = File.createTempFile("keystore", "");
65-
try {
66-
// may cause IOException with the original implementation because of too many open files
67-
for (int i = 0; i < 100000; i++) {
68-
FileUtils.writeStringToFile(temp, Base64.encodeBase64String(TEST.getBytes()));
69-
final String keystore = ConfigurationServerImpl.getBase64Keystore(temp.getPath());
70-
// let's decode it to make sure it makes sense
71-
Base64.decodeBase64(keystore);
72-
}
73-
} finally {
74-
temp.delete();
75-
}
76-
}
77-
7861
}

0 commit comments

Comments
 (0)