Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 7266abb

Browse files
committed
Merge pull request #1946 from stephentoub/remove_cs_test
Remove a bogus ConcurrentStack test
2 parents 1f60b07 + f029269 commit 7266abb

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

src/System.Collections.Concurrent/tests/ConcurrentStackTests.cs

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,6 @@ namespace System.Collections.Concurrent.Tests
1111
{
1212
public class ConcurrentStackTests
1313
{
14-
[Fact]
15-
public static void TestBasicScenarios()
16-
{
17-
ConcurrentStack<int> cs = new ConcurrentStack<int>();
18-
cs.Push(1);
19-
20-
Task[] tks = new Task[2];
21-
tks[0] = Task.Run(() =>
22-
{
23-
cs.Push(2);
24-
cs.Push(3);
25-
cs.Push(4);
26-
});
27-
28-
tks[1] = Task.Run(() =>
29-
{
30-
int item1, item2;
31-
var ret1 = cs.TryPop(out item1);
32-
// at least one item
33-
Assert.True(ret1);
34-
var ret2 = cs.TryPop(out item2);
35-
// two item
36-
if (ret2)
37-
{
38-
Assert.True(item1 > item2, String.Format("{0} should greater than {1}", item1, item2));
39-
}
40-
else // one item
41-
{
42-
Assert.Equal(1, item1);
43-
}
44-
});
45-
46-
Task.WaitAll(tks);
47-
}
48-
4914
[Fact]
5015
public static void Test0_Empty()
5116
{

0 commit comments

Comments
 (0)