Fixes behavioural problems introduced by property management refactoring. Should repair the tests

This commit is contained in:
emcho 2010-04-25 16:26:01 +00:00
parent f85fa67bfe
commit cb82b71f0d

View File

@ -156,6 +156,7 @@ public class TransactionSupportTests extends TestCase
//send
StunStack.getInstance().sendRequest(bindingRequest,
serverAddress, clientAddress, responseCollector);
//wait for retransmissions
Thread.sleep(1000);
@ -163,9 +164,11 @@ public class TransactionSupportTests extends TestCase
Vector<StunMessageEvent> reqs
= requestCollector.getRequestsForTransaction(
bindingRequest.getTransactionID());
assertTrue("No retransmissions of the request have been received",
reqs.size() > 1);
assertTrue("The binding request has not been retransmitted enough!",
assertTrue("The binding request has been retransmitted more than it "
+"should have!",
reqs.size() >= 3);
//restore the retransmissions prop in case others are counting on
@ -467,6 +470,7 @@ public class TransactionSupportTests extends TestCase
*/
public void requestReceived(StunMessageEvent evt)
{
synchronized(this)
{
receivedRequestsVector.add(evt);