Skip to content

Commit 43c9e08

Browse files
committed
Using random app Id for dapr testing.
1 parent c2583a1 commit 43c9e08

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dotnet/src/Experimental/Process.IntegrationTestRunner.Dapr/ProcessTestFixture.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ public sealed class ProcessTestFixture : IDisposable, IAsyncLifetime
1414
{
1515
private System.Diagnostics.Process? _process;
1616
private HttpClient? _httpClient;
17+
private string? _daprAppIdd;
1718

1819
/// <summary>
1920
/// Called by xUnit before the test is run.
2021
/// </summary>
2122
/// <returns></returns>
2223
public async Task InitializeAsync()
2324
{
25+
this._daprAppIdd = Guid.NewGuid().ToString("n");
2426
this._httpClient = new HttpClient();
2527
await this.StartTestHostAsync();
2628
}
@@ -37,7 +39,7 @@ private async Task StartTestHostAsync()
3739
var processStartInfo = new ProcessStartInfo
3840
{
3941
FileName = "dapr",
40-
Arguments = "run --app-id daprprocesstests --app-port 5200 --dapr-http-port 3500 -- dotnet run --urls http://localhost:5200",
42+
Arguments = $"run --app-id {this._daprAppIdd!} --app-port 5200 --dapr-http-port 3500 -- dotnet run --urls http://localhost:5200",
4143
WorkingDirectory = workingDirectory,
4244
RedirectStandardOutput = false,
4345
RedirectStandardError = false,
@@ -64,7 +66,7 @@ private async Task ShutdownTestHostAsync()
6466
var processStartInfo = new ProcessStartInfo
6567
{
6668
FileName = "dapr",
67-
Arguments = "stop --app-id daprprocesstests",
69+
Arguments = $"stop --app-id {this._daprAppIdd}",
6870
RedirectStandardOutput = false,
6971
RedirectStandardError = false,
7072
UseShellExecute = true,

0 commit comments

Comments
 (0)