Skip to content

Commit 352dec0

Browse files
committed
Minor change in integration tests
This uses the current time and a short uuid when creating test queues and exchanges. Copied from rabbitmq/rabbitmq-amqp-dotnet-client
1 parent e4e05a0 commit 352dec0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

projects/Test/Common/IntegrationFixture.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,12 +450,12 @@ protected async Task WithTemporaryChannelAsync(Func<IChannel, Task> action)
450450

451451
protected string GenerateExchangeName()
452452
{
453-
return $"{_testDisplayName}-exchange-{Guid.NewGuid()}";
453+
return $"{_testDisplayName}-exchange-{Util.Now}-{GenerateShortUuid()}";
454454
}
455455

456456
protected string GenerateQueueName()
457457
{
458-
return $"{_testDisplayName}-queue-{Guid.NewGuid()}";
458+
return $"{_testDisplayName}-queue-{Util.Now}-{GenerateShortUuid()}";
459459
}
460460

461461
protected Task WithTemporaryNonExclusiveQueueAsync(Func<IChannel, string, Task> action)
@@ -664,5 +664,7 @@ protected void LogWarning(string text,
664664
_output.WriteLine("::warning file={0},line={1}::{2} {3}",
665665
Path.GetFileName(file), line, member, text);
666666
}
667+
668+
private static string GenerateShortUuid() => S_Random.Next().ToString("x");
667669
}
668670
}

0 commit comments

Comments
 (0)