public void RunAllEntryTests() { try { TestsQueue testsQueue = _webData.GetFirstTestQueue(_client); while (testsQueue != null) { lock (_sync) { Tests testProcess = new Tests(); testProcess.GameId = testsQueue.GameId; RunSingleEntryTest(testsQueue, testProcess); } DeleteFolder(); testsQueue = _webData.GetFirstTestQueue(_client); } SendEmail(); _webData.StopAutomatedTestingEC2(_client); } catch (Exception e) { _logger.LogError(e.Message, e); SendEmail(); DeleteFolder(); _webData.StopAutomatedTestingEC2(_client); } }
public void RunAllEntryTests() { TestsQueue testsQueue = _webData.GetFirstTestQueue(_client); Tests testProcess = new Tests() { GameId = testsQueue.GameId }; try { while (testsQueue != null) { lock (_sync) { testProcess.GameId = testsQueue.GameId; RunSingleEntryTest(testsQueue, testProcess); } DeleteFolder(); testsQueue = _webData.GetFirstTestQueue(_client); } SendEmail(); _webData.StopAutomatedTestingEC2(_client); } catch (Exception e) { _logger.LogError(e.Message, e); _webData.DeleteTestQueue((int)testsQueue.GameId, _client); _webData.PutGames(new GamesEntry() { GameId = testsQueue.GameId, GameStatus = "p" }, _client); _webData.PutTests(testProcess, _client); _webData.PostTestingLog(new TestingLog() { GameId = testsQueue.GameId, TestlogAttempt = -1, TestlogDatetimeUtc = DateTime.Now, TestlogLog = "There was an error with the tests and the program has crashed due to: " + e.Message + " It will attempt to shutdown." }, _client); SendEmail(); DeleteFolder(); _webData.StopAutomatedTestingEC2(_client); } }