Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Rule: S2925 Do not use Thread.Sleep() in a test #6185

Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions analyzers/its/expected/akka.net/Akka.Cluster.Tests--net471-S2925.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
{
"issues": [
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1890,
"startColumn": 13,
"endLine": 1890,
"endColumn": 31
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1897,
"startColumn": 13,
"endLine": 1897,
"endColumn": 31
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1904,
"startColumn": 13,
"endLine": 1904,
"endColumn": 31
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1926,
"startColumn": 13,
"endLine": 1926,
"endColumn": 30
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1935,
"startColumn": 13,
"endLine": 1935,
"endColumn": 30
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1943,
"startColumn": 13,
"endLine": 1943,
"endColumn": 30
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1953,
"startColumn": 13,
"endLine": 1953,
"endColumn": 31
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1975,
"startColumn": 13,
"endLine": 1975,
"endColumn": 31
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1983,
"startColumn": 13,
"endLine": 1983,
"endColumn": 30
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1988,
"startColumn": 13,
"endLine": 1988,
"endColumn": 30
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1992,
"startColumn": 13,
"endLine": 1992,
"endColumn": 31
}
}
}
]
}
147 changes: 147 additions & 0 deletions analyzers/its/expected/akka.net/Akka.Cluster.Tests--net5.0-S2925.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
{
"issues": [
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1890,
"startColumn": 13,
"endLine": 1890,
"endColumn": 31
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1897,
"startColumn": 13,
"endLine": 1897,
"endColumn": 31
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1904,
"startColumn": 13,
"endLine": 1904,
"endColumn": 31
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1926,
"startColumn": 13,
"endLine": 1926,
"endColumn": 30
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1935,
"startColumn": 13,
"endLine": 1935,
"endColumn": 30
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1943,
"startColumn": 13,
"endLine": 1943,
"endColumn": 30
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1953,
"startColumn": 13,
"endLine": 1953,
"endColumn": 31
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1975,
"startColumn": 13,
"endLine": 1975,
"endColumn": 31
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1983,
"startColumn": 13,
"endLine": 1983,
"endColumn": 30
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1988,
"startColumn": 13,
"endLine": 1988,
"endColumn": 30
}
}
},
{
"id": "S2925",
"message": "Do not use 'Thread.Sleep()' in a test.",
"location": {
"uri": "sources\akka.net\src\core\Akka.Cluster.Tests\SBR\SplitBrainResolverSpec.cs",
"region": {
"startLine": 1992,
"startColumn": 13,
"endLine": 1992,
"endColumn": 31
}
}
}
]
}
Loading