diff --git a/test/org/ice4j/MessageEventDispatchingTest.java b/test/org/ice4j/MessageEventDispatchingTest.java index 3b3e700..b05436e 100644 --- a/test/org/ice4j/MessageEventDispatchingTest.java +++ b/test/org/ice4j/MessageEventDispatchingTest.java @@ -137,8 +137,8 @@ public class MessageEventDispatchingTest extends TestCase public void testClientTransactionTimeouts() throws Exception { String oldRetransValue = System.getProperty( - "org.ice4j.MAX_RETRANSMISSIONS"); - System.setProperty("org.ice4j.MAX_RETRANSMISSIONS", "1"); + StackProperties.MAX_CTRAN_RETRANSMISSIONS); + System.setProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS, "1"); stunStack.sendRequest(bindingRequest, serverAddress, clientAddress, responseCollector); responseCollector.waitForTimeout(); @@ -154,10 +154,10 @@ public class MessageEventDispatchingTest extends TestCase //restore the retransmissions prop in case others are counting on //defaults. if(oldRetransValue != null) - System.getProperty( "org.ice4j.MAX_RETRANSMISSIONS", + System.getProperty( StackProperties.MAX_CTRAN_RETRANSMISSIONS, oldRetransValue); else - System.clearProperty("org.ice4j.MAX_RETRANSMISSIONS"); + System.clearProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS); } /** diff --git a/test/org/ice4j/TransactionSupportTests.java b/test/org/ice4j/TransactionSupportTests.java index d59b9a4..3e91270 100644 --- a/test/org/ice4j/TransactionSupportTests.java +++ b/test/org/ice4j/TransactionSupportTests.java @@ -89,15 +89,15 @@ public class TransactionSupportTests extends TestCase requestCollector = new PlainRequestCollector(); responseCollector = new PlainResponseCollector(); - System.setProperty("org.ice4j.PROPAGATE_RECEIVED_RETRANSMISSIONS", + System.setProperty(StackProperties.PROPAGATE_RECEIVED_RETRANSMISSIONS, "false"); - System.setProperty("org.ice4j.KEEP_CLIENT_TRANS_AFTER_A_RESPONSE", + System.setProperty(StackProperties.KEEP_CRANS_AFTER_A_RESPONSE, "false"); - System.setProperty("org.ice4j.MAX_RETRANSMISSIONS", + System.setProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS, ""); - System.setProperty("org.ice4j.MAX_WAIT_INTERVAL", + System.setProperty(StackProperties.MAX_CTRAN_RETRANS_TIMER, ""); - System.setProperty("org.ice4j.ORIGINAL_WAIT_INTERVAL", + System.setProperty(StackProperties.FIRST_CTRAN_RETRANS_AFTER, ""); } @@ -118,15 +118,15 @@ public class TransactionSupportTests extends TestCase requestCollector = null; responseCollector = null; - System.setProperty("org.ice4j.PROPAGATE_RECEIVED_RETRANSMISSIONS", + System.setProperty(StackProperties.PROPAGATE_RECEIVED_RETRANSMISSIONS, "false"); - System.setProperty("org.ice4j.KEEP_CLIENT_TRANS_AFTER_A_RESPONSE", + System.setProperty(StackProperties.KEEP_CRANS_AFTER_A_RESPONSE, "false"); - System.setProperty("org.ice4j.MAX_RETRANSMISSIONS", + System.setProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS, ""); - System.setProperty("org.ice4j.MAX_WAIT_INTERVAL", + System.setProperty(StackProperties.MAX_CTRAN_RETRANS_TIMER, ""); - System.setProperty("org.ice4j.ORIGINAL_WAIT_INTERVAL", + System.setProperty(StackProperties.FIRST_CTRAN_RETRANS_AFTER, ""); super.tearDown(); @@ -140,15 +140,15 @@ public class TransactionSupportTests extends TestCase public void testClientRetransmissions() throws Exception { String oldRetransValue = System.getProperty( - "org.ice4j.MAX_RETRANSMISSIONS"); + StackProperties.MAX_CTRAN_RETRANSMISSIONS); String oldMaxWaitValue = System.getProperty( - "org.ice4j.MAX_WAIT_INTERVAL"); + StackProperties.MAX_CTRAN_RETRANS_TIMER); - System.setProperty("org.ice4j.MAX_WAIT_INTERVAL", "100"); - System.setProperty("org.ice4j.MAX_RETRANSMISSIONS", "2"); + System.setProperty(StackProperties.MAX_CTRAN_RETRANS_TIMER, "100"); + System.setProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS, "2"); //prepare to listen - System.setProperty("org.ice4j.PROPAGATE_RECEIVED_RETRANSMISSIONS", + System.setProperty(StackProperties.PROPAGATE_RECEIVED_RETRANSMISSIONS, "true"); StunStack.getInstance() @@ -171,16 +171,16 @@ public class TransactionSupportTests extends TestCase //restore the retransmissions prop in case others are counting on //defaults. if(oldRetransValue != null) - System.getProperty( "org.ice4j.MAX_RETRANSMISSIONS", + System.getProperty( StackProperties.MAX_CTRAN_RETRANSMISSIONS, oldRetransValue); else - System.clearProperty("org.ice4j.MAX_RETRANSMISSIONS"); + System.clearProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS); if(oldMaxWaitValue != null) - System.getProperty( "org.ice4j.MAX_WAIT_INTERVAL", + System.getProperty( StackProperties.MAX_CTRAN_RETRANS_TIMER, oldRetransValue); else - System.clearProperty("org.ice4j.MAX_WAIT_INTERVAL"); + System.clearProperty(StackProperties.MAX_CTRAN_RETRANS_TIMER); } /** @@ -192,8 +192,8 @@ public class TransactionSupportTests extends TestCase public void testServerRetransmissionHiding() throws Exception { String oldRetransValue = System.getProperty( - "org.ice4j.MAX_RETRANSMISSIONS"); - System.setProperty("org.ice4j.MAX_RETRANSMISSIONS", "2"); + StackProperties.MAX_CTRAN_RETRANSMISSIONS); + System.setProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS, "2"); //prepare to listen StunStack.getInstance().addRequestListener( serverAddress, requestCollector); @@ -216,10 +216,10 @@ public class TransactionSupportTests extends TestCase //restore the retransmissions prop in case others are counting on //defaults. if(oldRetransValue != null) - System.getProperty( "org.ice4j.MAX_RETRANSMISSIONS", + System.getProperty( StackProperties.MAX_CTRAN_RETRANSMISSIONS, oldRetransValue); else - System.clearProperty("org.ice4j.MAX_RETRANSMISSIONS"); + System.clearProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS); } /** @@ -232,12 +232,12 @@ public class TransactionSupportTests extends TestCase public void testServerResponseRetransmissions() throws Exception { String oldRetransValue = System.getProperty( - "org.ice4j.MAX_RETRANSMISSIONS"); - System.setProperty("org.ice4j.MAX_RETRANSMISSIONS", "2"); - System.setProperty("org.ice4j.MAX_WAIT_INTERVAL", "100"); + StackProperties.MAX_CTRAN_RETRANSMISSIONS); + System.setProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS, "2"); + System.setProperty(StackProperties.MAX_CTRAN_RETRANS_TIMER, "100"); //prepare to listen - System.setProperty("org.ice4j.KEEP_CLIENT_TRANS_AFTER_A_RESPONSE", + System.setProperty(StackProperties.KEEP_CRANS_AFTER_A_RESPONSE, "true"); StunStack.getInstance().addRequestListener( serverAddress, requestCollector); @@ -270,12 +270,12 @@ public class TransactionSupportTests extends TestCase //restore the retransmissions prop in case others are counting on //defaults. if(oldRetransValue != null) - System.getProperty( "org.ice4j.MAX_RETRANSMISSIONS", + System.getProperty( StackProperties.MAX_CTRAN_RETRANSMISSIONS, oldRetransValue); else - System.clearProperty("org.ice4j.MAX_RETRANSMISSIONS"); + System.clearProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS); - System.clearProperty("org.ice4j.MAX_WAIT_INTERVAL"); + System.clearProperty(StackProperties.MAX_CTRAN_RETRANS_TIMER); } /** @@ -316,7 +316,8 @@ public class TransactionSupportTests extends TestCase StunMessageEvent evt2 = reqs2.get(0); - assertFalse("Consecutive requests were assigned the same transaction id", + assertFalse( + "Consecutive requests were assigned the same transaction id", Arrays.equals( evt1.getMessage().getTransactionID(), evt2.getMessage().getTransactionID())); } @@ -332,10 +333,10 @@ public class TransactionSupportTests extends TestCase { //MAX_RETRANSMISSIONS - System.setProperty("org.ice4j.MAX_RETRANSMISSIONS", + System.setProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS, "2"); //make sure we see retransmissions so that we may count them - System.setProperty("org.ice4j.PROPAGATE_RECEIVED_RETRANSMISSIONS", + System.setProperty(StackProperties.PROPAGATE_RECEIVED_RETRANSMISSIONS, "true"); StunStack.getInstance().addRequestListener( serverAddress, requestCollector); @@ -369,10 +370,10 @@ public class TransactionSupportTests extends TestCase throws Exception { //MAX_RETRANSMISSIONS - System.setProperty("org.ice4j.ORIGINAL_WAIT_INTERVAL", + System.setProperty(StackProperties.FIRST_CTRAN_RETRANS_AFTER, "50"); //make sure we see retransmissions so that we may count them - System.setProperty("org.ice4j.PROPAGATE_RECEIVED_RETRANSMISSIONS", + System.setProperty(StackProperties.PROPAGATE_RECEIVED_RETRANSMISSIONS, "true"); StunStack.getInstance().addRequestListener( serverAddress, requestCollector); @@ -410,12 +411,12 @@ public class TransactionSupportTests extends TestCase throws Exception { //MAX_RETRANSMISSIONS - System.setProperty("org.ice4j.MAX_WAIT_INTERVAL", + System.setProperty(StackProperties.MAX_CTRAN_RETRANS_TIMER, "100"); //make sure we see retransmissions so that we may count them - System.setProperty("org.ice4j.PROPAGATE_RECEIVED_RETRANSMISSIONS", + System.setProperty(StackProperties.PROPAGATE_RECEIVED_RETRANSMISSIONS, "true"); - System.setProperty("org.ice4j.MAX_RETRANSMISSIONS", + System.setProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS, "11"); StunStack.getInstance() .addRequestListener(serverAddress, requestCollector); diff --git a/test/org/ice4j/stunclient/StunAddressDiscovererTest.java b/test/org/ice4j/stunclient/StunAddressDiscovererTest.java index 27a19e3..399206e 100644 --- a/test/org/ice4j/stunclient/StunAddressDiscovererTest.java +++ b/test/org/ice4j/stunclient/StunAddressDiscovererTest.java @@ -48,8 +48,8 @@ public class StunAddressDiscovererTest { super.setUp(); - System.setProperty("org.ice4j.MAX_WAIT_INTERVAL", "100"); - System.setProperty("org.ice4j.MAX_RETRANSMISSIONS", "2"); + System.setProperty(StackProperties.MAX_CTRAN_RETRANS_TIMER, "100"); + System.setProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS, "2"); responseServer = new ResponseSequenceServer(responseServerAddress); stunAddressDiscoverer @@ -62,8 +62,8 @@ public class StunAddressDiscovererTest protected void tearDown() throws Exception { - System.clearProperty("org.ice4j.MAX_WAIT_INTERVAL"); - System.clearProperty("org.ice4j.MAX_RETRANSMISSIONS"); + System.clearProperty(StackProperties.MAX_CTRAN_RETRANS_TIMER); + System.clearProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS); responseServer.shutDown(); stunAddressDiscoverer.shutDown(); stunAddressDiscoverer = null; diff --git a/test/org/ice4j/stunclient/StunAddressDiscovererTest_v4v6.java b/test/org/ice4j/stunclient/StunAddressDiscovererTest_v4v6.java index d470282..72a0401 100644 --- a/test/org/ice4j/stunclient/StunAddressDiscovererTest_v4v6.java +++ b/test/org/ice4j/stunclient/StunAddressDiscovererTest_v4v6.java @@ -80,15 +80,15 @@ public class StunAddressDiscovererTest_v4v6 extends TestCase { responseServer_v6.start(); responseServer_v4.start(); - System.setProperty("org.ice4j.MAX_WAIT_INTERVAL", "100"); - System.setProperty("org.ice4j.MAX_RETRANSMISSIONS", "2"); + System.setProperty(StackProperties.MAX_CTRAN_RETRANS_TIMER , "100"); + System.setProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS, "2"); } protected void tearDown() throws Exception { - System.clearProperty("org.ice4j.MAX_WAIT_INTERVAL"); - System.clearProperty("org.ice4j.MAX_RETRANSMISSIONS"); + System.clearProperty(StackProperties.MAX_CTRAN_RETRANS_TIMER); + System.clearProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS); responseServer_v6.shutDown(); responseServer_v4.shutDown(); diff --git a/test/org/ice4j/stunclient/StunAddressDiscovererTest_v6.java b/test/org/ice4j/stunclient/StunAddressDiscovererTest_v6.java index 07f2579..aa794f7 100644 --- a/test/org/ice4j/stunclient/StunAddressDiscovererTest_v6.java +++ b/test/org/ice4j/stunclient/StunAddressDiscovererTest_v6.java @@ -53,14 +53,14 @@ public class StunAddressDiscovererTest_v6 extends TestCase { stunAddressDiscoverer.start(); responseServer.start(); - System.setProperty("org.ice4j.MAX_WAIT_INTERVAL", "100"); - System.setProperty("org.ice4j.MAX_RETRANSMISSIONS", "2"); + System.setProperty(StackProperties.MAX_CTRAN_RETRANS_TIMER, "100"); + System.setProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS, "2"); } protected void tearDown() throws Exception { - System.clearProperty("org.ice4j.MAX_WAIT_INTERVAL"); - System.clearProperty("org.ice4j.MAX_RETRANSMISSIONS"); + System.clearProperty(StackProperties.MAX_CTRAN_RETRANS_TIMER); + System.clearProperty(StackProperties.MAX_CTRAN_RETRANSMISSIONS); responseServer.shutDown(); stunAddressDiscoverer.shutDown(); stunAddressDiscoverer = null;