Skip to content

Commit

Permalink
Test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
surgupta-msft committed Sep 25, 2024
1 parent a600b63 commit 4718c28
Showing 1 changed file with 6 additions and 31 deletions.
37 changes: 6 additions & 31 deletions test/Azure.Functions.Cli.Tests/E2E/StartTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ await CliTester.Run(new RunConfiguration
testOutputHelper.Output.Should().Contain($"This version of the Azure Functions Core Tools requires your project to reference version {DotnetConstants.InProcFunctionsMinSdkVersion} or later of {DotnetConstants.InProcFunctionsSdk}.");
}
},
CommandTimeout = TimeSpan.FromSeconds(900),
CommandTimeout = TimeSpan.FromSeconds(300),
}, _output);
}

Expand Down Expand Up @@ -441,7 +441,7 @@ await CliTester.Run(new RunConfiguration
testOutputHelper.Output.Should().Contain($"This version of the Azure Functions Core Tools requires your project to reference version {DotnetConstants.InProcFunctionsMinSdkVersion} or later of {DotnetConstants.InProcFunctionsSdk}.");
}
},
CommandTimeout = TimeSpan.FromSeconds(900),
CommandTimeout = TimeSpan.FromSeconds(300),
}, _output);
}

Expand All @@ -461,15 +461,15 @@ await CliTester.Run(new RunConfiguration
{
using (var client = new HttpClient() { BaseAddress = new Uri("http://localhost:7073") })
{
await Task.Delay(TimeSpan.FromSeconds(2));
await Task.Delay(TimeSpan.FromSeconds(10));
}

if (_output is Xunit.Sdk.TestOutputHelper testOutputHelper)
{
testOutputHelper.Output.Should().Contain($"This version of the Azure Functions Core Tools requires your project to reference version {DotnetConstants.InProcFunctionsMinSdkVersion} or later of {DotnetConstants.InProcFunctionsSdk}.");
}
},
CommandTimeout = TimeSpan.FromSeconds(900),
CommandTimeout = TimeSpan.FromSeconds(300),
}, _output);
}

Expand All @@ -489,15 +489,15 @@ await CliTester.Run(new RunConfiguration
{
using (var client = new HttpClient() { BaseAddress = new Uri("http://localhost:7073") })
{
await Task.Delay(TimeSpan.FromSeconds(2));
await Task.Delay(TimeSpan.FromSeconds(10));
}

if (_output is Xunit.Sdk.TestOutputHelper testOutputHelper)
{
testOutputHelper.Output.Should().Contain($"This version of the Azure Functions Core Tools requires your project to reference version {DotnetConstants.InProcFunctionsMinSdkVersion} or later of {DotnetConstants.InProcFunctionsSdk}.");
}
},
CommandTimeout = TimeSpan.FromSeconds(900),
CommandTimeout = TimeSpan.FromSeconds(300),
}, _output);
}

Expand Down Expand Up @@ -693,31 +693,6 @@ await CliTester.Run(new RunConfiguration
}, _output);
}

[Fact]
public async Task start_dotnet_isolated_inproc_with_specifying_runtime()
{
await CliTester.Run(new RunConfiguration
{
Commands = new[]
{
"init . --worker-runtime dotnet --target-framework net6.0",
"new --template Httptrigger --name HttpTrigger",
"start --port 7073 --verbose --runtime inproc6"
},
ExpectExit = false,
ErrorContains = ["Failed to locate the inproc6 model host at"],
Test = async (workingDir, p) =>
{
using (var client = new HttpClient() { BaseAddress = new Uri("http://localhost:7073") })
{
await Task.Delay(TimeSpan.FromSeconds(2));
}
},
CommandTimeout = TimeSpan.FromSeconds(100),
}, _output);
}


[Fact]
public async Task start_dotnet_isolated_csharp_with_oop_host_with_runtime_specified()
{
Expand Down

0 comments on commit 4718c28

Please sign in to comment.