Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sburmanoctopus committed Dec 13, 2023
1 parent d369e95 commit beb58dd
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ public async Task ShouldLogStartupDiagnosticsToInstanceLogFileOnly(TentacleConfi
await clientAndTentacle.RunningTentacle.Stop(CancellationToken);

var startingLogText = clientAndTentacle.RunningTentacle.ReadAllLogFileText();

string wholeLog = string.Empty;
////TODO: REMOVE
//await Task.Delay(5000);
//var startingLogText2 = clientAndTentacle.RunningTentacle.ReadAllLogFileText();
Expand All @@ -432,9 +432,10 @@ public async Task ShouldLogStartupDiagnosticsToInstanceLogFileOnly(TentacleConfi
.Execute(
() =>
{
var wholeLog = clientAndTentacle.RunningTentacle.ReadAllLogFileText();

wholeLog = clientAndTentacle.RunningTentacle.ReadAllLogFileText();
var newLog = wholeLog.Replace(startingLogText, string.Empty);
if (!string.IsNullOrWhiteSpace(newLog) || !newLog.Contains("CommandLine:"))
if (string.IsNullOrWhiteSpace(newLog) || !newLog.Contains("CommandLine:"))
{
throw new NotLoggedYetException();
}
Expand Down Expand Up @@ -489,8 +490,9 @@ public async Task ShouldLogStartupDiagnosticsToInstanceLogFileOnly(TentacleConfi
{
Logger.Error("Failed to get new log content");
Logger.Error($"Process exit code {exitCode}");
Logger.Error($"Starting log text: {Environment.NewLine}{startingLogText}");
Logger.Error($"Current log text: {Environment.NewLine}{clientAndTentacle.RunningTentacle.ReadAllLogFileText()}");
Logger.Error($"**** Starting log text: {Environment.NewLine}{startingLogText}");
Logger.Error($"**** Whole log text: {Environment.NewLine}{wholeLog}");
Logger.Error($"**** Current log text: {Environment.NewLine}{clientAndTentacle.RunningTentacle.ReadAllLogFileText()}");
Logger.Error($"Command StdOut: {Environment.NewLine}{stdout}");
Logger.Error($"Command StdErr: {Environment.NewLine}{stderr}");

Expand Down

0 comments on commit beb58dd

Please sign in to comment.