Skip to content

Commit

Permalink
Tag some more tests as long running or performance related.
Browse files Browse the repository at this point in the history
  • Loading branch information
drieseng committed Jul 15, 2016
1 parent c2c6e6d commit 521a174
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/Renci.SshNet.Tests/Classes/Common/ASCIIEncodingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ public void IsSingleByte()
}

[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void GetBytes_Performance()
{
const string input = "eererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqs";
Expand Down Expand Up @@ -191,6 +193,8 @@ public void GetBytes_Performance()
}

[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void GetChars_Performance()
{
var input = new byte[2000];
Expand Down
4 changes: 4 additions & 0 deletions src/Renci.SshNet.Tests/Classes/Common/BigIntegerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,8 @@ public void Bug16526()
}

[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void ToArray_Performance()
{
const int loopCount = 100000000;
Expand All @@ -1586,6 +1588,8 @@ public void ToArray_Performance()
}

[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void Ctor_ByteArray_Performance()
{
const int loopCount = 100000000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ public void ShouldConcatSecondToFirstWhenBothAreNotEmpty()
}

[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void Performance_LargeArray_FirstEmpty()
{
var first = Array<byte>.Empty;
Expand All @@ -108,6 +110,8 @@ public void Performance_LargeArray_FirstEmpty()


[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void Performance_LargeArray_SecondEmpty()
{
var first = CreateBuffer(50000);
Expand All @@ -118,6 +122,8 @@ public void Performance_LargeArray_SecondEmpty()
}

[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void Performance_LargeArray_BothNotEmpty()
{
var first = CreateBuffer(50000);
Expand All @@ -127,7 +133,7 @@ public void Performance_LargeArray_BothNotEmpty()
Performance(first, second, runs);
}

private void Performance(byte[] first, byte[] second, int runs)
private static void Performance(byte[] first, byte[] second, int runs)
{
var stopWatch = new Stopwatch();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ public void ShouldReturnTrueWhenLeftIsSameAsRight()
}

[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void Performance_LargeArray_Equal()
{
var buffer = CreateBuffer(50000);
Expand All @@ -108,6 +110,8 @@ public void Performance_LargeArray_Equal()
Performance(left, right, runs);
}
[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void Performance_LargeArray_NotEqual_DifferentLength()
{
var left = CreateBuffer(50000);
Expand All @@ -118,6 +122,8 @@ public void Performance_LargeArray_NotEqual_DifferentLength()
}

[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void Performance_LargeArray_NotEqual_SameLength()
{
var buffer = CreateBuffer(50000);
Expand All @@ -129,6 +135,8 @@ public void Performance_LargeArray_NotEqual_SameLength()
}

[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void Performance_LargeArray_Same()
{
var left = CreateBuffer(50000);
Expand All @@ -138,7 +146,7 @@ public void Performance_LargeArray_Same()
Performance(left, right, runs);
}

private void Performance(byte[] left, byte[] right, int runs)
private static void Performance(byte[] left, byte[] right, int runs)
{
var stopWatch = new Stopwatch();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void Performance_LargeArray_ZeroCount()
Performance(value, count, runs);
}

private void Performance(byte[] value, int count, int runs)
private static void Performance(byte[] value, int count, int runs)
{
var stopWatch = new Stopwatch();

Expand Down
9 changes: 9 additions & 0 deletions test/Renci.SshNet.Shared.Tests/SshMessageFactoryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ public void TotalMessageCountShouldBeTotalNumberOfSupportedMessages()
}

[TestMethod]
[TestCategory("Performance")]
public void Performance_Ctor()
{
const int runCount = 100000;
Expand Down Expand Up @@ -478,6 +479,8 @@ public void Performance_Ctor()
}

[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void Performance_Create()
{
const int runCount = 10000000;
Expand Down Expand Up @@ -535,6 +538,8 @@ public void Performance_Create()
}

[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void Performance_EnableAndActivateMessage()
{
const int runCount = 1000000;
Expand Down Expand Up @@ -581,6 +586,8 @@ public void Performance_EnableAndActivateMessage()
}

[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void Performance_DisableAndDeactivateMessage()
{
const int runCount = 1000000;
Expand Down Expand Up @@ -627,6 +634,8 @@ public void Performance_DisableAndDeactivateMessage()
}

[TestMethod]
[TestCategory("LongRunning")]
[TestCategory("Performance")]
public void Performance_DisableNonKeyExchangeMessages()
{
const int runCount = 1000000;
Expand Down

0 comments on commit 521a174

Please sign in to comment.