зеркало из https://github.com/microsoft/AMBROSIA.git
Added JS Giant Check point and JS Fixed Message Tests
This commit is contained in:
Родитель
a81d7f75f9
Коммит
0d5354fd96
|
@ -40,7 +40,7 @@ namespace AmbrosiaTest
|
|||
//** Setting the largest maxMessageSize and batchSizeCutoff since maxMessageSize is the size of payload and batchSizeCutoff is the number of message - this is not Fixed message size so as it is descending
|
||||
//** C# LB uses 64 MB for GiantMessageTest
|
||||
//**
|
||||
//** NOTE - this test takes kind of a long time to run especially do more than 2 rounds. Maybe longer than it should: Bug #166 - Large Messages have poor performance
|
||||
//** NOTE - this test takes kind of a long time (15+ mins) to run especially do more than 2 rounds. Maybe longer than it should: Bug #166 - Large Messages have poor performance
|
||||
//**
|
||||
[TestMethod]
|
||||
public void JS_PTI_GiantMessage_BiDi_Test()
|
||||
|
@ -48,13 +48,13 @@ namespace AmbrosiaTest
|
|||
Utilities MyUtils = new Utilities();
|
||||
JS_Utilities JSUtils = new JS_Utilities();
|
||||
|
||||
int numRounds = 2;
|
||||
long totalBytes = 536870912;
|
||||
long totalEchoBytes = 536870912;
|
||||
int numRounds = 3;
|
||||
long totalBytes = 805306368;
|
||||
long totalEchoBytes = 805306368;
|
||||
int bytesPerRound = 268435456; // 256 MB
|
||||
int maxMessageSize = 67108864; // 64 MBs
|
||||
int batchSizeCutoff = 1;
|
||||
int messagesSent = 12;
|
||||
int messagesSent = 28;
|
||||
bool bidi = true;
|
||||
|
||||
string testName = "jsptigiantmessagebiditest";
|
||||
|
@ -106,7 +106,6 @@ namespace AmbrosiaTest
|
|||
// Verify the data in the output file - too many changing rows in output to do a cmp file so verify some of the key lines
|
||||
bool pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Bytes received: " + totalBytes.ToString(), 15, false, testName, true); // number of bytes processed
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "SUCCESS: The expected number of bytes (" + totalBytes.ToString() + ") have been received", 2, false, testName, true);
|
||||
//pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "SUCCESS: The expected number of echoed bytes (" + totalEchoBytes.ToString() + ") have been received", 5, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "All rounds complete (" + messagesSent.ToString() + " messages sent)", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "[IC] Connected!", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "round #" + numRounds.ToString(), 1, false, testName, true);
|
||||
|
@ -115,26 +114,114 @@ namespace AmbrosiaTest
|
|||
JSUtils.JS_VerifyTimeTravelDebugging(testName, numRounds, totalBytes, totalEchoBytes, bytesPerRound, maxMessageSize, batchSizeCutoff, bidi, true, true);
|
||||
}
|
||||
|
||||
//** Setting the largest memoryUsed
|
||||
//** Setting the largest memoryUsed to simulate large checkpoints
|
||||
[TestMethod]
|
||||
public void JS_PTI_GiantCheckPoint_Test()
|
||||
{
|
||||
Utilities MyUtils = new Utilities();
|
||||
JS_Utilities JSUtils = new JS_Utilities();
|
||||
|
||||
int numRounds = 12;
|
||||
long totalBytes = 512;
|
||||
long totalEchoBytes = 512;
|
||||
int bytesPerRound = 128;
|
||||
int maxMessageSize = 64;
|
||||
|
||||
int numRounds = 2;
|
||||
long totalBytes = 134217728;
|
||||
long totalEchoBytes = 134217728;
|
||||
int bytesPerRound = 67108864; //64 MB
|
||||
int maxMessageSize = 33554432;
|
||||
int batchSizeCutoff = 32;
|
||||
int messagesSent = 22;
|
||||
bool bidi = false;
|
||||
|
||||
|
||||
//*#*#*# TO DO - Get this working ... should work with 1120MB as that is what the error message said ...
|
||||
//*#*#* Update bidi test too
|
||||
int memoryUsed = 65536; //Bug #170 1073741824 = 1GB // 1174405120; //1120MB -- C# LB is 2000483648 (can't do full 2147483648) - padding"(in bytes) used to simulate large checkpoints by being included in app state; defaults to 0
|
||||
|
||||
int checkPointSize = 750; // 750 when have 0 memory used
|
||||
|
||||
string testName = "jsptigiantcheckpointtest";
|
||||
string logOutputFileName_TestApp = testName + "_TestApp.log";
|
||||
|
||||
JSUtils.JS_UpdateJSConfigFile(JSUtils.JSConfig_instanceName, testName);
|
||||
JSUtils.StartJSPTI(numRounds, totalBytes, totalEchoBytes, bytesPerRound, maxMessageSize, batchSizeCutoff, true, logOutputFileName_TestApp);
|
||||
JSUtils.StartJSPTI(numRounds, totalBytes, totalEchoBytes, bytesPerRound, maxMessageSize, batchSizeCutoff, bidi, logOutputFileName_TestApp, memoryUsed);
|
||||
|
||||
// Verify the data in the output file - too many changing rows in output to do a cmp file so verify some of the key lines
|
||||
bool pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Bytes received: " + totalBytes.ToString(), 5, false, testName, true); // number of bytes processed
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "SUCCESS: The expected number of bytes (" + totalBytes.ToString() + ") have been received", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "All rounds complete (" + messagesSent.ToString() + " messages sent)", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "round #" + numRounds.ToString(), 1, false, testName, true);
|
||||
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "[IC] Connected!", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "[IC] Reading a checkpoint "+ checkPointSize.ToString() + " bytes", 1, false, testName, true);
|
||||
|
||||
// Verify integrity of Ambrosia logs by replaying
|
||||
JSUtils.JS_VerifyTimeTravelDebugging(testName, numRounds, totalBytes, totalEchoBytes, bytesPerRound, maxMessageSize, batchSizeCutoff, bidi, true, true);
|
||||
}
|
||||
|
||||
|
||||
//** Similar to non bidi test but this is small byte settings and bidi
|
||||
[TestMethod]
|
||||
public void JS_PTI_GiantCheckPoint_BiDi_Test()
|
||||
{
|
||||
Utilities MyUtils = new Utilities();
|
||||
JS_Utilities JSUtils = new JS_Utilities();
|
||||
|
||||
int numRounds = 5;
|
||||
long totalBytes = 640;
|
||||
long totalEchoBytes = 640;
|
||||
int bytesPerRound = 128;
|
||||
int maxMessageSize = 32;
|
||||
int batchSizeCutoff = 32;
|
||||
int messagesSent = 36;
|
||||
|
||||
int memoryUsed = 1024; //*#*#*#* UPDATE THIS 1073741824; //1GB // 1174405120; //1120MB -- C# LB is 2000483648 (can't do full 2147483648) - padding"(in bytes) used to simulate large checkpoints by being included in app state; defaults to 0
|
||||
|
||||
int checkPointSize = 2821; // 750 when have 0 memory used -- 2821 when meme used = 1024 //*#*#*#*#*#* Update this !!!!!
|
||||
bool bidi = true;
|
||||
|
||||
string testName = "jsptigiantcheckpointbiditest";
|
||||
string logOutputFileName_TestApp = testName + "_TestApp.log";
|
||||
|
||||
JSUtils.JS_UpdateJSConfigFile(JSUtils.JSConfig_instanceName, testName);
|
||||
JSUtils.StartJSPTI(numRounds, totalBytes, totalEchoBytes, bytesPerRound, maxMessageSize, batchSizeCutoff, bidi, logOutputFileName_TestApp, memoryUsed);
|
||||
|
||||
// Verify the data in the output file - too many changing rows in output to do a cmp file so verify some of the key lines
|
||||
bool pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Bytes received: " + totalBytes.ToString(), 5, false, testName, true); // number of bytes processed
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "SUCCESS: The expected number of bytes (" + totalBytes.ToString() + ") have been received", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "SUCCESS: The expected number of echoed bytes (" + totalEchoBytes.ToString() + ") have been received", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "All rounds complete (" + messagesSent.ToString() + " messages sent)", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "round #" + numRounds.ToString(), 1, false, testName, true);
|
||||
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "[IC] Connected!", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "[IC] Reading a checkpoint "+ checkPointSize.ToString() + " bytes", 1, false, testName, true);
|
||||
|
||||
|
||||
// Verify integrity of Ambrosia logs by replaying
|
||||
JSUtils.JS_VerifyTimeTravelDebugging(testName, numRounds, totalBytes, totalEchoBytes, bytesPerRound, maxMessageSize, batchSizeCutoff, bidi, true, true);
|
||||
}
|
||||
|
||||
|
||||
//** Simple bidi test of Fixed message length - using small data sizes
|
||||
[TestMethod]
|
||||
public void JS_PTI_FixedMsgSize_BiDi_Test()
|
||||
{
|
||||
Utilities MyUtils = new Utilities();
|
||||
JS_Utilities JSUtils = new JS_Utilities();
|
||||
|
||||
int numRounds = 7;
|
||||
long totalBytes = 896;
|
||||
long totalEchoBytes = 896;
|
||||
int bytesPerRound = 128;
|
||||
int maxMessageSize = 32;
|
||||
int batchSizeCutoff = 32;
|
||||
int messagesSent = 28;
|
||||
bool bidi = true;
|
||||
bool fixedMsgSize = true;
|
||||
|
||||
string testName = "jsptibidifmstest";
|
||||
string logOutputFileName_TestApp = testName + "_TestApp.log";
|
||||
|
||||
JSUtils.JS_UpdateJSConfigFile(JSUtils.JSConfig_instanceName, testName);
|
||||
JSUtils.StartJSPTI(numRounds, totalBytes, totalEchoBytes, bytesPerRound, maxMessageSize, batchSizeCutoff, bidi, logOutputFileName_TestApp, 0,fixedMsgSize);
|
||||
|
||||
// Verify the data in the output file - too many changing rows in output to do a cmp file so verify some of the key lines
|
||||
bool pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Bytes received: " + totalBytes.ToString(), 5, false, testName, true); // number of bytes processed
|
||||
|
@ -143,11 +230,54 @@ namespace AmbrosiaTest
|
|||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "All rounds complete (" + messagesSent.ToString() + " messages sent)", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "[IC] Connected!", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "round #" + numRounds.ToString(), 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Starting new round (with 7 rounds left) of 4 messages of 32 bytes each", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Starting new round (with 6 rounds left) of 4 messages of 32 bytes each", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Starting new round (with 5 rounds left) of 4 messages of 32 bytes each", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Starting new round (with 4 rounds left) of 4 messages of 32 bytes each", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Starting new round (with 3 rounds left) of 4 messages of 32 bytes each", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Starting new round (with 2 rounds left) of 4 messages of 32 bytes each", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Starting new round (with 1 round left) of 4 messages of 32 bytes each", 1, false, testName, true);
|
||||
|
||||
// Verify integrity of Ambrosia logs by replaying
|
||||
JSUtils.JS_VerifyTimeTravelDebugging(testName, numRounds, totalBytes, totalEchoBytes, bytesPerRound, maxMessageSize, batchSizeCutoff, true, true, true);
|
||||
JSUtils.JS_VerifyTimeTravelDebugging(testName, numRounds, totalBytes, totalEchoBytes, bytesPerRound, maxMessageSize, batchSizeCutoff, bidi, true, true);
|
||||
}
|
||||
|
||||
//** Simple test (not bidi) of Fixed message length - using larger data sizes
|
||||
[TestMethod]
|
||||
public void JS_PTI_FixedMsgSize_Test()
|
||||
{
|
||||
Utilities MyUtils = new Utilities();
|
||||
JS_Utilities JSUtils = new JS_Utilities();
|
||||
|
||||
int numRounds = 3;
|
||||
long totalBytes = 201326592;
|
||||
long totalEchoBytes = 201326592;
|
||||
int bytesPerRound = 67108864;
|
||||
int maxMessageSize = 4194304;
|
||||
int batchSizeCutoff = 128;
|
||||
int messagesSent = 48;
|
||||
bool bidi = false;
|
||||
bool fixedMsgSize = true;
|
||||
|
||||
string testName = "jsptifmstest";
|
||||
string logOutputFileName_TestApp = testName + "_TestApp.log";
|
||||
|
||||
JSUtils.JS_UpdateJSConfigFile(JSUtils.JSConfig_instanceName, testName);
|
||||
JSUtils.StartJSPTI(numRounds, totalBytes, totalEchoBytes, bytesPerRound, maxMessageSize, batchSizeCutoff, bidi, logOutputFileName_TestApp, 0, fixedMsgSize);
|
||||
|
||||
// Verify the data in the output file - too many changing rows in output to do a cmp file so verify some of the key lines
|
||||
bool pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Bytes received: " + totalBytes.ToString(), 5, false, testName, true); // number of bytes processed
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "SUCCESS: The expected number of bytes (" + totalBytes.ToString() + ") have been received", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "All rounds complete (" + messagesSent.ToString() + " messages sent)", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "[IC] Connected!", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "round #" + numRounds.ToString(), 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Starting new round (with 3 rounds left) of 16 messages of 4194304 bytes each", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Starting new round (with 2 rounds left) of 16 messages of 4194304 bytes each", 1, false, testName, true);
|
||||
pass = MyUtils.WaitForProcessToFinish(logOutputFileName_TestApp, "Starting new round (with 1 round left) of 16 messages of 4194304 bytes each", 1, false, testName, true);
|
||||
|
||||
// Verify integrity of Ambrosia logs by replaying
|
||||
JSUtils.JS_VerifyTimeTravelDebugging(testName, numRounds, totalBytes, totalEchoBytes, bytesPerRound, maxMessageSize, batchSizeCutoff, bidi, true, true);
|
||||
}
|
||||
|
||||
|
||||
//** Runs the built in unit tests
|
||||
|
@ -160,7 +290,7 @@ namespace AmbrosiaTest
|
|||
|
||||
string testName = "jsnodeunittest";
|
||||
string finishedString = "UNIT TESTS COMPLETE";
|
||||
string successString = "SUMMARY: 112 passed (100%), 0 failed (0%)";
|
||||
string successString = "SUMMARY: 114 passed (100%), 0 failed (0%)";
|
||||
string logOutputFileName_TestApp = testName + "_TestApp.log";
|
||||
|
||||
// Launched all the unit tests for JS Node (npm run unittests)
|
||||
|
|
|
@ -175,7 +175,7 @@ namespace AmbrosiaTest
|
|||
|
||||
|
||||
// Start Javascript Test App
|
||||
public int StartJSPTI(int numRounds, long totalBytes, long totalEchoBytes, int bytesPerRound, int maxMessageSize, int batchSizeCutoff, bool bidi, string testOutputLogFile, int memoryUsed = 0)
|
||||
public int StartJSPTI(int numRounds, long totalBytes, long totalEchoBytes, int bytesPerRound, int maxMessageSize, int batchSizeCutoff, bool bidi, string testOutputLogFile, int memoryUsed = 0, bool fms = false)
|
||||
{
|
||||
|
||||
/* *** For reference - PTI parameters
|
||||
|
@ -198,9 +198,6 @@ namespace AmbrosiaTest
|
|||
-efb | --expectedFinalBytes = : [Server] The total number of bytes expected to be received from all clients; the server will report a "success" message when this number of bytes have been received
|
||||
*/
|
||||
|
||||
|
||||
//*#*#*# TO DO: Add tests for large check point, other non basic end to end tests using the various parameters
|
||||
|
||||
Utilities MyUtils = new Utilities();
|
||||
|
||||
// Launch the client job process with these values
|
||||
|
@ -220,6 +217,12 @@ namespace AmbrosiaTest
|
|||
argString = argString + " -m="+ memoryUsed.ToString();
|
||||
}
|
||||
|
||||
// fixed message size
|
||||
if (fms)
|
||||
{
|
||||
argString = argString + " -fms";
|
||||
}
|
||||
|
||||
|
||||
int processID = MyUtils.LaunchProcess(workingDir, fileNameExe, argString, false, testOutputLogFile);
|
||||
if (processID <= 0)
|
||||
|
@ -470,7 +473,12 @@ namespace AmbrosiaTest
|
|||
Thread.Sleep(2000);
|
||||
MyUtils.CleanupAzureTables("jsptigiantcheckpointtest");
|
||||
Thread.Sleep(2000);
|
||||
|
||||
MyUtils.CleanupAzureTables("jsptigiantcheckpointbiditest");
|
||||
Thread.Sleep(2000);
|
||||
MyUtils.CleanupAzureTables("jsptibidifmstest");
|
||||
Thread.Sleep(2000);
|
||||
MyUtils.CleanupAzureTables("jsptifmstest");
|
||||
Thread.Sleep(2000);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
"appVersion": 0,
|
||||
"upgradeVersion": 0,
|
||||
"activeCode": "VCurrent",
|
||||
"icLogStorageType": "Files",
|
||||
"isActiveActive": false,
|
||||
"replicaNumber": 0,
|
||||
"lbOptions":
|
||||
{
|
||||
"deleteLogs": false,
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
"requires": true,
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "16.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.2.tgz",
|
||||
"integrity": "sha512-TbG4TOx9hng8FKxaVrCisdaxKxqEwJ3zwHoCWXZ0Jw6mnvTInpaB99/2Cy4+XxpXtjNv9/TgfGSvZFyfV/t8Fw=="
|
||||
"version": "16.7.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.8.tgz",
|
||||
"integrity": "sha512-8upnoQU0OPzbIkm+ZMM0zCeFCkw2s3mS0IWdx0+AAaWqm4fkBb0UJp8Edl7FVKRamYbpJC/aVsHpKWBIbiC7Zg=="
|
||||
},
|
||||
"ajv": {
|
||||
"version": "6.12.6",
|
||||
|
@ -22,7 +22,7 @@
|
|||
},
|
||||
"ambrosia-node": {
|
||||
"version": "file:ambrosia-node-0.0.83.tgz",
|
||||
"integrity": "sha512-Q2pD6DtVAUnxZL4ezadfv6ZkSIc2Tm25EyuzeIn2qlJp3uAAzCxCXUjpUzkfP9hLR3ow64KY4/enND4jgQ3ffA==",
|
||||
"integrity": "sha512-k123DSYwETZmNUaTH6pGWdv8LFu3W620I7lFQ1Bit6llTIOQtUICapYxUjGfQ7JsBtJGw4mj9nF7C+8iy8Y7rg==",
|
||||
"requires": {
|
||||
"@types/node": "^16.4.12",
|
||||
"azure-storage": "^2.10.4",
|
||||
|
@ -107,9 +107,9 @@
|
|||
}
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||
},
|
||||
"dashdash": {
|
||||
"version": "1.14.1",
|
||||
|
@ -501,6 +501,13 @@
|
|||
"assert-plus": "^1.0.0",
|
||||
"core-util-is": "1.0.2",
|
||||
"extsprintf": "^1.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
}
|
||||
}
|
||||
},
|
||||
"xml2js": {
|
||||
|
|
Загрузка…
Ссылка в новой задаче