Skip to content

Commit

Permalink
Don't use timeouts in non-async tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed May 20, 2024
1 parent 9361f34 commit 1609b5a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions CliWrap.Tests/ConfigurationSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace CliWrap.Tests;

public class ConfigurationSpecs
{
[Fact(Timeout = 15000)]
[Fact]
public void I_can_create_a_command_with_the_default_configuration()
{
// Act
Expand All @@ -25,7 +25,7 @@ public void I_can_create_a_command_with_the_default_configuration()
cmd.StandardErrorPipe.Should().Be(PipeTarget.Null);
}

[Fact(Timeout = 15000)]
[Fact]
public void I_can_configure_the_target_file()
{
// Arrange
Expand All @@ -40,7 +40,7 @@ public void I_can_configure_the_target_file()
modified.TargetFilePath.Should().Be("bar");
}

[Fact(Timeout = 15000)]
[Fact]
public void I_can_configure_the_command_line_arguments()
{
// Arrange
Expand All @@ -55,7 +55,7 @@ public void I_can_configure_the_command_line_arguments()
modified.Arguments.Should().Be("qqq ppp");
}

[Fact(Timeout = 15000)]
[Fact]
public void I_can_configure_the_command_line_arguments_by_passing_an_array()
{
// Arrange
Expand All @@ -70,7 +70,7 @@ public void I_can_configure_the_command_line_arguments_by_passing_an_array()
modified.Arguments.Should().Be("-a \"foo bar\"");
}

[Fact(Timeout = 15000)]
[Fact]
public void I_can_configure_the_command_line_arguments_using_a_builder()
{
// Arrange
Expand All @@ -94,7 +94,7 @@ public void I_can_configure_the_command_line_arguments_using_a_builder()
.Be("-a \"foo bar\" \"\\\"foo\\\\bar\\\"\" 3.14 foo bar -5 89.13");
}

[Fact(Timeout = 15000)]
[Fact]
public void I_can_configure_the_working_directory()
{
// Arrange
Expand All @@ -109,7 +109,7 @@ public void I_can_configure_the_working_directory()
modified.WorkingDirPath.Should().Be("new");
}

[Fact(Timeout = 15000)]
[Fact]
public void I_can_configure_the_user_credentials()
{
// Arrange
Expand All @@ -128,7 +128,7 @@ public void I_can_configure_the_user_credentials()
.BeEquivalentTo(new Credentials("domain", "username", "password", true));
}

[Fact(Timeout = 15000)]
[Fact]
public void I_can_configure_the_user_credentials_using_a_builder()
{
// Arrange
Expand All @@ -147,7 +147,7 @@ public void I_can_configure_the_user_credentials_using_a_builder()
.BeEquivalentTo(new Credentials("domain", "username", "password", true));
}

[Fact(Timeout = 15000)]
[Fact]
public void I_can_configure_the_environment_variables()
{
// Arrange
Expand All @@ -168,7 +168,7 @@ public void I_can_configure_the_environment_variables()
);
}

[Fact(Timeout = 15000)]
[Fact]
public void I_can_configure_the_environment_variables_using_a_builder()
{
// Arrange
Expand Down Expand Up @@ -197,7 +197,7 @@ public void I_can_configure_the_environment_variables_using_a_builder()
);
}

[Fact(Timeout = 15000)]
[Fact]
public void I_can_configure_the_result_validation_strategy()
{
// Arrange
Expand All @@ -212,7 +212,7 @@ public void I_can_configure_the_result_validation_strategy()
modified.Validation.Should().Be(CommandResultValidation.None);
}

[Fact(Timeout = 15000)]
[Fact]
public void I_can_configure_the_stdin_pipe()
{
// Arrange
Expand All @@ -226,7 +226,7 @@ public void I_can_configure_the_stdin_pipe()
original.StandardInputPipe.Should().NotBeSameAs(modified.StandardInputPipe);
}

[Fact(Timeout = 15000)]
[Fact]
public void I_can_configure_the_stdout_pipe()
{
// Arrange
Expand All @@ -240,7 +240,7 @@ public void I_can_configure_the_stdout_pipe()
original.StandardOutputPipe.Should().NotBeSameAs(modified.StandardOutputPipe);
}

[Fact(Timeout = 15000)]
[Fact]
public void I_can_configure_the_stderr_pipe()
{
// Arrange
Expand Down
2 changes: 1 addition & 1 deletion CliWrap.Tests/ExecutionSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public async Task I_can_execute_a_command_and_not_hang_on_large_stdout_and_stder
await cmd.ExecuteAsync();
}

[Fact(Timeout = 15000)]
[Fact]
public void I_can_try_to_execute_a_command_and_get_an_error_if_the_target_file_does_not_exist()
{
// Arrange
Expand Down

0 comments on commit 1609b5a

Please sign in to comment.