This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -49,7 +49,7 @@
|
||||
"AYANOVA_USE_URLS": "http://*:7575;",
|
||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||
"AYANOVA_SERVER_TEST_MODE":"false",
|
||||
"AYANOVA_SERVER_TEST_MODE":"true",
|
||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL":"small",
|
||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET":"-7",
|
||||
"AYANOVA_BACKUP_PG_DUMP_PATH":"C:\\data\\code\\PostgreSQLPortable_12.0\\App\\PgSQL\\bin\\"
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace AyaNova
|
||||
_newLog.LogDebug("Initializing services...");
|
||||
|
||||
_newLog.LogDebug("Health");
|
||||
services.AddHealthChecks().AddDbContextCheck<AyContext>();;
|
||||
services.AddHealthChecks().AddDbContextCheck<AyContext>(); ;
|
||||
|
||||
_newLog.LogDebug("Profiler");
|
||||
//https://dotnetthoughts.net/using-miniprofiler-in-aspnetcore-webapi/
|
||||
@@ -572,7 +572,8 @@ namespace AyaNova
|
||||
_newLog.LogInformation($"Server test mode seeding, level is {ServerBootConfig.AYANOVA_SERVER_TEST_MODE_SEEDLEVEL}, tz offset is {ServerBootConfig.AYANOVA_SERVER_TEST_MODE_TZ_OFFSET}");
|
||||
AyaNova.Core.License.FetchKeyAsync(apiServerState, dbContext, _newLog).Wait();
|
||||
//NOTE: For unit testing make sure the time zone is same as tester to ensure list filter by date tests will work because server is on same page as user in terms of time
|
||||
Util.Seeder.SeedDatabaseAsync(Util.Seeder.StringToSeedLevel(ServerBootConfig.AYANOVA_SERVER_TEST_MODE_SEEDLEVEL), ServerBootConfig.AYANOVA_SERVER_TEST_MODE_TZ_OFFSET).Wait();
|
||||
var seed = new Util.SeederNew();
|
||||
seed.SeedDatabaseAsync(SeederNew.Level.StringToSeedLevel(ServerBootConfig.AYANOVA_SERVER_TEST_MODE_SEEDLEVEL), ServerBootConfig.AYANOVA_SERVER_TEST_MODE_TZ_OFFSET).Wait();
|
||||
}
|
||||
//TESTING
|
||||
|
||||
|
||||
@@ -738,7 +738,6 @@ namespace AyaNova.Util
|
||||
//this is 4 times slower than doing it inside the loop below
|
||||
//seems counterintuitive but maybe it's to do with the db context not being refreshed?
|
||||
|
||||
|
||||
var f = new Bogus.Faker();//todo: this *can't* be right, I'm seeding 20k widgets in some cases
|
||||
|
||||
|
||||
@@ -752,7 +751,7 @@ namespace AyaNova.Util
|
||||
{
|
||||
Widget o = new Widget();
|
||||
o.Name = Uniquify(f.Commerce.ProductName());
|
||||
o.Active = true;
|
||||
o.Active = true;
|
||||
DateTime dtSeed = f.Date.Between(seedStartWindow, seedEndWindow).ToUniversalTime();
|
||||
o.StartDate = dtSeed;
|
||||
o.EndDate = dtSeed.AddMinutes(60).ToUniversalTime();
|
||||
|
||||
Reference in New Issue
Block a user