-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional Logging for Flakey Workspace Cleanup Test and removal of Sync over Async while deleting a workspace #740
Additional Logging for Flakey Workspace Cleanup Test and removal of Sync over Async while deleting a workspace #740
Conversation
Additional test logging to try and diagnose flakey behavour.
This pull request has been linked to Shortcut Story #66742: Tentacle Flakey Tests. |
logger.Information("****** CLIENT AND TENTACLE DISPOSE CALLED *****"); | ||
logger.Information("* Subsequent errors should be ignored *"); | ||
logger.Information("****** ****** ****** ****** ****** ****** ******"); | ||
var banner = new StringBuilder(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directory.Exists(startScriptWorkspaceDirectory).Should().BeFalse("Workspace should be naturally cleaned up after completion"); | ||
runningScriptResult.LogExecuteScriptOutput(Logger); | ||
|
||
runningScriptResult.ScriptExecutionResult.ExitCode.Should().Be(0, "Script should have completed successfully"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to ensure everything works in the test and there is not another side effect causing the test to fail
@@ -82,11 +82,6 @@ public string ResolvePath(string fileName) | |||
return path; | |||
} | |||
|
|||
public void Delete() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing Sync code path that does a Wait on an Async call as we can be fully async now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving FileSystem.DeleteDirectory sync method as it is used in other places in the tests. Future cleanup task.
{ | ||
public static class ScriptExecutionResultExtensionMethods | ||
{ | ||
public static void LogExecuteScriptOutput(this (ScriptExecutionResult ScriptExecutionResult, List<ProcessOutput> ProcessOutput) result, ILogger logger) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Background
Adding some more logging to a flakey test
WhenScriptServiceIsRunning_ThenWorkspaceIsNotDeleted
e.g. https://build.octopushq.com/buildConfiguration/TeamFireAndMotion_OctopusTentacleNet48_SensibleDefaultsChainFullChain/10569176?hideTestsFromDependencies=false&hideProblemsFromDependencies=false&expandBuildTestsSection=true&expandBuildProblemsSection=true&expandBuildDeploymentsSection=falseRemoved a sync call that then did a Wait on an async call as well can be fully async now.
[sc-66742]
How to review this PR
Quality ✔️
Pre-requisites