The build of latest master branch spent much more time on ConfigurationServerImplTest.java, which includes test getBase64Keystore 100000 times.
Is it neccesary? [root@weizhou-centos incubator-cloudstack]# git diff 2f29185943ac0412aa501b59493837b4055642e0 4894187991d581b72807b4282b7a29a48a8031e5 + @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(); + } + }