Merge pull request #594 from LuisAntonRebollo/unit-tests-without-crash

Increased stability Torque3D: unit-tests running without a crash.
This commit is contained in:
Daniel Buckmaster 2014-06-16 10:57:04 +10:00
commit feec36731e
18 changed files with 113 additions and 19 deletions

View file

@ -87,8 +87,8 @@ CreateUnitTest( TestTCPRequest, "Platform/Net/TCPRequest")
// Open a TCP connection to garagegames.com
mSocket = Net::openConnectTo("ip:72.246.107.193:80");
while(Process::processEvents())
U32 limit = Platform::getRealMilliseconds() + (5*1000);
while(Process::processEvents() && (Platform::getRealMilliseconds() < limit) )
;
// Unhook from the signals.
@ -176,6 +176,12 @@ CreateUnitTest( TestTCPRequestJournal, "Platform/Net/JournalTCPRequest")
{
Journal::Record("journalTCP.jrn");
if( !Journal::IsRecording() )
{
test(0, "Failed.");
return;
}
makeRequest();
S32 bytesRead = mDataRecved;