diff --git a/devdocs/todo.txt b/devdocs/todo.txt index ec946be7..fe8baae3 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -28,13 +28,8 @@ Once that is done then can steam ahead on the biz objects but until I have the c IMMEDIATE ITEMS: ================ -- fixup removal of db context from search processing, then... -- Re-test search with new processing code, do a huge test locally repeatedly for a bit - - If ok then move on to do the devops test again with a fresh build and huge db -- Whole point is to eliminate the exceptions and have it work properly. -- Also maybe find better way using lock() code to generate unique ID numbers for the unit tests - Put up copy to devops, build huge dataset, run all tests, pound it with 1000 runs, shake it out - Starting 1000 test runs at 2018-10-9-4:12pm diff --git a/server/AyaNova/Startup.cs b/server/AyaNova/Startup.cs index 5213dcfd..c3357b43 100644 --- a/server/AyaNova/Startup.cs +++ b/server/AyaNova/Startup.cs @@ -365,7 +365,7 @@ namespace AyaNova // ******************** TESTING WIPE DB ***************************** // //Set this to true to wipe the db and reinstall a trial license and re-seed the data - var TESTING_REFRESH_DB = true; + var TESTING_REFRESH_DB = false;//############################################################################################# #if (DEBUG) //TESTING @@ -403,7 +403,7 @@ namespace AyaNova if (TESTING_REFRESH_DB) { AyaNova.Core.License.Fetch(apiServerState, dbContext, _log); - Util.Seeder.SeedDatabase(Util.Seeder.SeedLevel.SmallOneManShopTrialDataSet); + Util.Seeder.SeedDatabase(Util.Seeder.SeedLevel.HugeForLoadTest);//############################################################################################# } //TESTING #endif diff --git a/server/AyaNova/util/AyaNovaVersion.cs b/server/AyaNova/util/AyaNovaVersion.cs index 08faa660..dfe82dbe 100644 --- a/server/AyaNova/util/AyaNovaVersion.cs +++ b/server/AyaNova/util/AyaNovaVersion.cs @@ -11,7 +11,7 @@ namespace AyaNova.Util { get { - return "8.0.0-alpha.2018.10.9"; + return "8.0.0-alpha.2018.10.11"; } } diff --git a/test/raven-integration/AutoId.cs b/test/raven-integration/AutoId.cs new file mode 100644 index 00000000..676fef91 --- /dev/null +++ b/test/raven-integration/AutoId.cs @@ -0,0 +1,26 @@ +using System; +using System.Threading.Tasks; +namespace raven_integration +{ + public class AutoId + { + private readonly object valueLock = new object(); + private uint currentValue; //postgre bigint + + public AutoId(uint initialValue) + { + currentValue = initialValue; + } + + public uint GetNext() + { + lock (valueLock) + { + currentValue += 1; + if (currentValue == 0) + currentValue += 1; + return currentValue; + } + } + } +} \ No newline at end of file diff --git a/test/raven-integration/burntest.bat b/test/raven-integration/burntest.bat index b2a426d8..52c19f6c 100644 --- a/test/raven-integration/burntest.bat +++ b/test/raven-integration/burntest.bat @@ -2,8 +2,7 @@ SET /a VAR=0 :HOME SET /a VAR=VAR+1 rem 1000 runs in local debug mode server is about 6 hours at current test pace with huge data -IF %VAR%==100 goto :End - +IF %VAR%==250 goto :End dotnet test - -goto :HOME \ No newline at end of file +goto :HOME +:End \ No newline at end of file diff --git a/test/raven-integration/util.cs b/test/raven-integration/util.cs index a3786fbd..a70a4548 100644 --- a/test/raven-integration/util.cs +++ b/test/raven-integration/util.cs @@ -19,9 +19,12 @@ namespace raven_integration public static ConcurrentDictionary authDict = new ConcurrentDictionary();//10,32 + private static AutoId Auto { get; } = new AutoId(0); + public static string Uniquify(string s) { - return s + " " + ((DateTimeOffset)DateTime.Now).ToUnixTimeMilliseconds().ToString(); + // return s + " " + Auto.GetNext().ToString(); + return s + " " + (Auto.GetNext() + ((DateTimeOffset)DateTime.Now).ToUnixTimeMilliseconds()).ToString(); } public async static Task GetTokenAsync(string login, string password = null)