Skip to content

Instantly share code, notes, and snippets.

@TsuyoshiUshio
Created March 20, 2020 04:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TsuyoshiUshio/f51a2ddabcf3684d30f8ea1d9679f03b to your computer and use it in GitHub Desktop.
Save TsuyoshiUshio/f51a2ddabcf3684d30f8ea1d9679f03b to your computer and use it in GitHub Desktop.
Serial Prallel mixed tests
using System;
using System.Threading.Tasks;
using Xunit;
namespace SerialAndParallelSpike
{
[CollectionDefinition("Non-Parallel Collection", DisableParallelization = true)]
public class NonParallelCollectionDefinitionClass
{
}
[Collection("Non-Parallel Collection")]
public class SerialTest
{
[Fact]
public async Task Test10()
{
await Task.Delay(TimeSpan.FromSeconds(5));
Assert.True(true);
}
[Fact]
public async Task Test11()
{
await Task.Delay(TimeSpan.FromSeconds(5));
Assert.True(true);
}
}
public class ParallelTest01
{
[Fact]
public async Task Test1()
{
await Task.Delay(TimeSpan.FromSeconds(5));
Assert.True(true);
}
[Fact]
public async Task Test2()
{
await Task.Delay(TimeSpan.FromSeconds(5));
Assert.True(true);
}
}
public class ParallelTest02
{
[Fact]
public async Task Test3()
{
await Task.Delay(TimeSpan.FromSeconds(5));
Assert.True(true);
}
[Fact]
public async Task Test4()
{
await Task.Delay(TimeSpan.FromSeconds(5));
Assert.True(true);
}
}
public class TrulyParallelTest01
{
[Fact]
public async Task Test5()
{
await Task.Delay(TimeSpan.FromSeconds(5));
Assert.True(true);
}
}
public class TrulyParallelTest02
{
[Fact]
public async Task Test6()
{
await Task.Delay(TimeSpan.FromSeconds(5));
Assert.True(true);
}
}
[Collection("Serial")]
public class SerialTest01
{
[Fact]
public async Task Test7()
{
await Task.Delay(TimeSpan.FromSeconds(5));
Assert.True(true);
}
}
[Collection("Serial")]
public class SerialTest02
{
[Fact]
public async Task Test8()
{
await Task.Delay(TimeSpan.FromSeconds(5));
Assert.True(true);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment