Skip to content

Commit

Permalink
Fix flapping memory growth test (#136)
Browse files Browse the repository at this point in the history
* Passes locally 100%, fails freqently on AppVeyor
  • Loading branch information
Colin Sullivan authored Nov 16, 2016
1 parent f9cb1da commit 49feda0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NATSUnitTests/UnitTestConn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -337,15 +337,15 @@ public void TestConnectionMemoryLeak()
}

// allow the last dispose to finish.
Thread.Sleep(500);
Thread.Sleep(2000);

GC.Collect();

double memGrowthPercent = 100 * (
((double)(Process.GetCurrentProcess().PrivateMemorySize64 - memStart))
/ (double)memStart);

Assert.True(memGrowthPercent < 20.0);
Assert.True(memGrowthPercent < 30.0);
}
}

Expand Down

0 comments on commit 49feda0

Please sign in to comment.