1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 09:39:39 +02:00

Split SmackConfiguration into Configuration and Initalization

also add SmackConfiguration.addDisabledSmackClass()
This commit is contained in:
Florian Schmaus 2014-09-05 12:17:50 +02:00
parent 08504fdb48
commit af9b9a8769
4 changed files with 294 additions and 206 deletions

View file

@ -16,8 +16,11 @@
*/
package org.jivesoftware.smack;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.junit.Ignore;
import org.junit.Test;
public class SmackConfigurationTest {
@ -30,4 +33,28 @@ public class SmackConfigurationTest {
fail("SmackConfiguration threw Throwable");
}
}
// As there is currently no annotation/way to run a testclass/single test in a separate VM,
// which is required for reliable results of this test, and we don't want to fork a VM for
// *every* test, those tests are currently disabled. Hopefully this will change in the future.
@Ignore
@Test
public void smackConfigurationShouldNotCauseInitializationTest() {
SmackConfiguration.getDefaultPacketReplyTimeout();
// Only a call to SmackConfiguration.getVersion() should cause Smack to become initialized.
assertFalse(SmackConfiguration.isSmackInitialized());
}
// As there is currently no annotation/way to run a testclass/single test in a separate VM,
// which is required for reliable results of this test, and we don't want to fork a VM for
// *every* test, those tests are currently disabled. Hopefully this will change in the future.
@Ignore
@Test
public void smackconfigurationVersionShouldInitialzieSmacktTest() {
SmackConfiguration.getVersion();
// Only a call to SmackConfiguration.getVersion() should cause Smack to become initialized.
assertTrue(SmackConfiguration.isSmackInitialized());
}
}