Skip to content

Commit

Permalink
Fix flakey WhenScriptServiceIsRunning_ThenWorkspaceIsNotDeleted test (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwoctopusdeploy authored Dec 18, 2023
1 parent 338a2e8 commit f8f8d12
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,7 @@ public async Task WhenScriptServiceIsRunning_ThenWorkspaceIsNotDeleted(TentacleC
Directory.Exists(startScriptWorkspaceDirectory).Should().BeTrue("Workspace should not have been cleaned up");

File.WriteAllText(waitBeforeCompletingScriptFile, "Write file that makes script continue executing");
var runningScriptResult = await runningScriptTask;

runningScriptResult.LogExecuteScriptOutput(Logger);

runningScriptResult.ScriptExecutionResult.ExitCode.Should().Be(0, "Script should have completed successfully");
runningScriptResult.ScriptExecutionResult.State.Should().Be(ProcessState.Complete, "Script should have completed successfully");
Directory.Exists(startScriptWorkspaceDirectory).Should().BeFalse($"Workspace {startScriptWorkspaceDirectory} should have been cleaned up when CompleteScript was called");
await runningScriptTask;
}

[Test]
Expand Down

0 comments on commit f8f8d12

Please sign in to comment.