[Fact]
public void EventWaitHandle_Create_BeyondMaxPathLength()
{
- string name = new string('x', Interop.Kernel32.MAX_PATH + 100);
+ // GetRandomName prevents name collision when two tests run at the same time
+ string name = GetRandomName() + new string('x', Interop.Kernel32.MAX_PATH);
+
EventWaitHandleSecurity security = GetBasicEventWaitHandleSecurity();
EventResetMode mode = EventResetMode.AutoReset;
[Fact]
public void Mutex_Create_BeyondMaxPathLength()
{
- string name = new string('x', Interop.Kernel32.MAX_PATH + 100);
+ // GetRandomName prevents name collision when two tests run at the same time
+ string name = GetRandomName() + new string('x', Interop.Kernel32.MAX_PATH);
if (PlatformDetection.IsFullFramework)
{
[Fact]
public void Semaphore_Create_BeyondMaxPathLength()
{
- string name = new string('x', Interop.Kernel32.MAX_PATH + 100);
+ // GetRandomName prevents name collision when two tests run at the same time
+ string name = GetRandomName() + new string('x', Interop.Kernel32.MAX_PATH);
if (PlatformDetection.IsFullFramework)
{