ndt-dev - [ndt-dev] [ndt] r1081 committed - Necessary changes before a release can be made...
Subject: NDT-DEV email list created
List archive
[ndt-dev] [ndt] r1081 committed - Necessary changes before a release can be made...
Chronological Thread
- From:
- To:
- Subject: [ndt-dev] [ndt] r1081 committed - Necessary changes before a release can be made...
- Date: Mon, 16 Jun 2014 18:53:11 +0000
Revision: 1081
Author:
Date: Mon Jun 16 18:52:53 2014 UTC
Log: Necessary changes before a release can be made
Before a release can be made, these changes from
Issue144 branch need to be merged into trunk.
http://code.google.com/p/ndt/source/detail?r=1081
Modified:
/branches/Issue144Staging
/branches/Issue144Staging/flash-client/src/TestC2S.as
/branches/Issue144Staging/flash-client/src/TestMETA.as
/branches/Issue144Staging/flash-client/src/TestS2C.as
=======================================
--- /branches/Issue144Staging/flash-client/src/TestC2S.as Wed May 28 11:17:18 2014 UTC
+++ /branches/Issue144Staging/flash-client/src/TestC2S.as Mon Jun 16 18:52:53 2014 UTC
@@ -35,13 +35,15 @@
// Valid values for _testStage.
private static const PREPARE_TEST1:int = 0;
private static const PREPARE_TEST2:int = 1;
- private static const START_TEST:int = 2;
- private static const SEND_DATA:int = 3;
- private static const COMPUTE_THROUGHPUT:int = 4;
- private static const COMPARE_SERVER1:int = 5;
- private static const COMPARE_SERVER2:int = 6;
- private static const FINALIZE_TEST:int = 7;
- private static const END_TEST:int = 8;
+ private static const START_TEST1:int = 2;
+ private static const START_TEST2:int = 3;
+ private static const SEND_DATA:int = 4;
+ private static const COMPUTE_THROUGHPUT:int = 5;
+ private static const COMPARE_SERVER1:int = 6;
+ private static const COMPARE_SERVER2:int = 7;
+ private static const FINALIZE_TEST1:int = 8;
+ private static const FINALIZE_TEST2:int = 9;
+ private static const END_TEST:int = 10;
private var _callerObj:NDTPController;
private var _c2sTestSuccess:Boolean;
@@ -111,13 +113,17 @@
break;
case PREPARE_TEST2: prepareTest2();
break;
- case START_TEST: startTest();
+ case START_TEST1: startTest1();
+ break;
+ case START_TEST2: startTest2();
break;
case COMPARE_SERVER1: compareWithServer1();
break;
case COMPARE_SERVER2: compareWithServer2();
break;
- case FINALIZE_TEST: finalizeTest();
+ case FINALIZE_TEST1: finalizeTest1();
+ break;
+ case FINALIZE_TEST2: finalizeTest2();
break;
case END_TEST: endTest();
break;
@@ -191,7 +197,7 @@
_speedUpdateTimer = new Timer(SPEED_UPDATE_TIMER);
_speedUpdateTimer.addEventListener(TimerEvent.TIMER, onSpeedUpdate);
_msg = new Message();
- _testStage = START_TEST;
+ _testStage = START_TEST1;
TestResults.appendDebugMsg("C2S test: START_TEST stage.");
if (_ctlSocket.bytesAvailable > 0)
@@ -199,7 +205,7 @@
// they trigger a single ProgressEvent.SOCKET_DATA event. In such case,
// it's necessary to explicitly call the following function to move to
// the next step.
- startTest();
+ startTest1();
}
private function addC2SSocketEventListeners():void {
@@ -246,8 +252,6 @@
}
private function onC2SProgress(e:OutputProgressEvent):void {
- if (_c2sSocket.bytesPending == 0)
- _c2sSendCount++;
if (_c2sSocket.connected) {
sendData();
} else {
@@ -272,12 +276,21 @@
/ _c2sTestDuration);
}
- private function startTest():void {
+ private function startTest1():void {
if (!_msg.readHeader(_ctlSocket))
return;
+ _testStage = START_TEST2;
+ if (_ctlSocket.bytesAvailable > 0)
+ // In case header and body have arrive together at the client, they
+ // trigger a single ProgressEvent.SOCKET_DATA event. In such case,
+ // it's necessary to explicitly call the following function to move to
+ // the next step.
+ startTest2();
+ }
+
+ private function startTest2():void {
if (!_msg.readBody(_ctlSocket, _msg.length))
return;
-
if (_msg.type != MessageType.TEST_START) {
TestResults.appendErrMsg(ResourceManager.getInstance().getString(
NDTConstants.BUNDLE_NAME, "outboundWrongMessage", null,
@@ -311,6 +324,7 @@
*/
private function sendData():void {
_c2sSocket.writeBytes(_dataToSend, 0, _dataToSend.length);
+ _c2sSendCount++;
_c2sSocket.flush();
}
@@ -343,6 +357,7 @@
private function calculateThroughput():void {
TestResults.appendDebugMsg("C2S test: COMPUTE_THROUGHPUT stage.");
+ TestResults.appendDebugMsg("C2S test: _c2sBytesNotSent: " + _c2sBytesNotSent);
var c2sByteSent:Number = (
_c2sSendCount * NDTConstants.PREDEFINED_BUFFER_SIZE
@@ -422,19 +437,29 @@
+ sc2sSpeed.toFixed(2) + " kbps");
_msg = new Message();
- _testStage = FINALIZE_TEST;
+ _testStage = FINALIZE_TEST1;
TestResults.appendDebugMsg("C2S test: FINALIZE_TEST stage.");
if(_ctlSocket.bytesAvailable > 0)
// If COMPARE_SERVER and TEST_FINALIZE messages arrive together at the
// client, they trigger a single ProgressEvent.SOCKET_DATA event. In
// such case, it's necessary to explicitly call the following function
// to move to the next step.
- finalizeTest();
+ finalizeTest1();
}
- private function finalizeTest():void {
+ private function finalizeTest1():void {
if (!_msg.readHeader(_ctlSocket))
return;
+ _testStage = FINALIZE_TEST2;
+ if (_ctlSocket.bytesAvailable > 0)
+ // In case header and body have arrive together at the client, they
+ // trigger a single ProgressEvent.SOCKET_DATA event. In such case,
+ // it's necessary to explicitly call the following function to move to
+ // the next step.
+ finalizeTest2();
+ }
+
+ private function finalizeTest2():void {
if (!_msg.readBody(_ctlSocket, _msg.length))
return;
=======================================
--- /branches/Issue144Staging/flash-client/src/TestMETA.as Wed May 28 11:17:18 2014 UTC
+++ /branches/Issue144Staging/flash-client/src/TestMETA.as Mon Jun 16 18:52:53 2014 UTC
@@ -27,10 +27,12 @@
// Valid values for _testStage.
private static const PREPARE_TEST1:int = 0;
private static const PREPARE_TEST2:int = 1;
- private static const START_TEST:int = 2;
- private static const SEND_DATA:int = 3;
- private static const FINALIZE_TEST:int = 4;
- private static const END_TEST:int = 5;
+ private static const START_TEST1:int = 2;
+ private static const START_TEST2:int = 3;
+ private static const SEND_DATA:int = 4;
+ private static const FINALIZE_TEST1:int = 5;
+ private static const FINALIZE_TEST2:int = 6;
+ private static const END_TEST:int = 7;
private var _callerObj:NDTPController;
private var _ctlSocket:Socket;
@@ -86,9 +88,13 @@
break;
case PREPARE_TEST2: prepareTest2();
break;
- case START_TEST: startTest();
+ case START_TEST1: startTest1();
break;
- case FINALIZE_TEST: finalizeTest();
+ case START_TEST2: startTest2();
+ break;
+ case FINALIZE_TEST1:finalizeTest1();
+ break;
+ case FINALIZE_TEST2:finalizeTest2();
break;
case END_TEST: endTest();
break;
@@ -129,7 +135,7 @@
}
_msg = new Message();
- _testStage = START_TEST;
+ _testStage = START_TEST1;
TestResults.appendDebugMsg("META test: START_TEST stage.");
if (_ctlSocket.bytesAvailable > 0)
@@ -137,12 +143,22 @@
// they trigger a single ProgressEvent.SOCKET_DATA event. In such case,
// it's necessary to explicitly call the following function to move to
// the next step.
- startTest();
+ startTest1();
}
- private function startTest():void {
+ private function startTest1():void {
if (!_msg.readHeader(_ctlSocket))
return;
+ _testStage = START_TEST2;
+ if (_ctlSocket.bytesAvailable > 0)
+ // In case header and body have arrive together at the client, they
+ // trigger a single ProgressEvent.SOCKET_DATA event. In such case,
+ // it's necessary to explicitly call the following function to move to
+ // the next step.
+ startTest2();
+ }
+
+ private function startTest2():void {
if (!_msg.readBody(_ctlSocket, _msg.length))
return;
@@ -224,17 +240,29 @@
return;
}
- _testStage = FINALIZE_TEST;
+ _msg = new Message();
+ _testStage = FINALIZE_TEST1;
TestResults.appendDebugMsg("META test: FINALIZE_TEST stage.");
// The following check is probably not necessary. Added anyway, in case
// the TEST_FINALIZE message does not trigger onReceivedData.
if (_ctlSocket.bytesAvailable > 0)
- finalizeTest();
+ finalizeTest1();
}
- private function finalizeTest():void {
+ private function finalizeTest1():void {
if (!_msg.readHeader(_ctlSocket))
return;
+ _testStage = FINALIZE_TEST2;
+ if (_ctlSocket.bytesAvailable > 0)
+ // In case header and body have arrive together at the client, they
+ // trigger a single ProgressEvent.SOCKET_DATA event. In such case,
+ // it's necessary to explicitly call the following function to move to
+ // the next step.
+ finalizeTest2();
+ }
+
+
+ private function finalizeTest2():void {
if (!_msg.readBody(_ctlSocket, _msg.length))
return;
=======================================
--- /branches/Issue144Staging/flash-client/src/TestS2C.as Wed May 28 11:17:18 2014 UTC
+++ /branches/Issue144Staging/flash-client/src/TestS2C.as Mon Jun 16 18:52:53 2014 UTC
@@ -36,14 +36,15 @@
// Valid values for _testStage.
private static const PREPARE_TEST1:int = 0;
private static const PREPARE_TEST2:int = 1;
- private static const START_TEST:int = 2;
- private static const RECEIVE_DATA:int = 3;
- private static const COMPARE_SERVER1:int = 4;
- private static const COMPARE_SERVER2:int = 5;
- private static const COMPUTE_THROUGHPUT:int = 6;
- private static const GET_WEB1001:int = 7;
- private static const GET_WEB1002:int = 8;
- private static const END_TEST:int = 9;
+ private static const START_TEST1:int = 2;
+ private static const START_TEST2:int = 3;
+ private static const RECEIVE_DATA:int = 4;
+ private static const COMPARE_SERVER1:int = 5;
+ private static const COMPARE_SERVER2:int = 6;
+ private static const COMPUTE_THROUGHPUT:int = 7;
+ private static const GET_WEB1001:int = 8;
+ private static const GET_WEB1002:int = 9;
+ private static const END_TEST:int = 10;
private static const THROUGHPUT_VALUE:String = "ThroughputValue";
private static const UNSENT_DATA_AMOUNT:String = "UnsentDataAmount";
private static const TOTAL_SENT_BYTE:String = "TotalSentByte";
@@ -115,7 +116,9 @@
break;
case PREPARE_TEST2: prepareTest2();
break;
- case START_TEST: startTest();
+ case START_TEST1: startTest1();
+ break;
+ case START_TEST2: startTest2();
break;
case COMPARE_SERVER1: compareWithServer1();
break;
@@ -191,7 +194,7 @@
_s2cTimer = new Timer(NDTConstants.S2C_DURATION);
_s2cTimer.addEventListener(TimerEvent.TIMER, onS2CTimeout);
_msg = new Message();
- _testStage = START_TEST;
+ _testStage = START_TEST1;
TestResults.appendDebugMsg("S2C test: START_TEST stage.");
if (_ctlSocket.bytesAvailable > 0)
@@ -199,7 +202,7 @@
// they trigger a single ProgressEvent.SOCKET_DATA event. In such case,
// it's necessary to explicitly call the following function to move to
// the next step.
- startTest();
+ startTest1();
}
private function addS2CSocketEventListeners():void {
@@ -258,9 +261,19 @@
/ _s2cTestDuration;
}
- private function startTest():void {
+ private function startTest1():void {
if (!_msg.readHeader(_ctlSocket))
return;
+ _testStage = START_TEST2;
+ if (_ctlSocket.bytesAvailable > 0)
+ // In case header and body have arrive together at the client, they
+ // trigger a single ProgressEvent.SOCKET_DATA event. In such case,
+ // it's necessary to explicitly call the following function to move to
+ // the next step.
+ startTest2();
+ }
+
+ private function startTest2():void {
if (!_msg.readBody(_ctlSocket, _msg.length))
return;
- [ndt-dev] [ndt] r1081 committed - Necessary changes before a release can be made..., ndt, 06/16/2014
Archive powered by MHonArc 2.6.16.