diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2013-03-10 19:50:10 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2013-03-10 19:50:10 -0700 |
commit | 6726f043f82d490d89c8403085b1d3d43a88d6c8 (patch) | |
tree | cc8458c7cd27bef3056604ed9078aa16e7765fcd /src/DotNetOpenAuth.Test/TestBase.cs | |
parent | 6beb76839944cf8c35732c5d2a35052c512e3be5 (diff) | |
download | DotNetOpenAuth-6726f043f82d490d89c8403085b1d3d43a88d6c8.zip DotNetOpenAuth-6726f043f82d490d89c8403085b1d3d43a88d6c8.tar.gz DotNetOpenAuth-6726f043f82d490d89c8403085b1d3d43a88d6c8.tar.bz2 |
More build break fixes.
Diffstat (limited to 'src/DotNetOpenAuth.Test/TestBase.cs')
-rw-r--r-- | src/DotNetOpenAuth.Test/TestBase.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth.Test/TestBase.cs b/src/DotNetOpenAuth.Test/TestBase.cs index 92adafa..612d871 100644 --- a/src/DotNetOpenAuth.Test/TestBase.cs +++ b/src/DotNetOpenAuth.Test/TestBase.cs @@ -8,6 +8,7 @@ namespace DotNetOpenAuth.Test { using System; using System.IO; using System.Reflection; + using System.Threading.Tasks; using System.Web; using DotNetOpenAuth.Messaging.Reflection; using DotNetOpenAuth.OAuth.Messages; @@ -67,7 +68,7 @@ namespace DotNetOpenAuth.Test { log4net.LogManager.Shutdown(); } - internal static Stats MeasurePerformance(Action action, float maximumAllowedUnitTime, int samples = 10, int iterations = 100, string name = null) { + internal static Stats MeasurePerformance(Func<Task> action, float maximumAllowedUnitTime, int samples = 10, int iterations = 100, string name = null) { if (!PerformanceTestUtilities.IsOptimized(typeof(OpenIdRelyingParty).Assembly)) { Assert.Inconclusive("Unoptimized code."); } @@ -75,7 +76,7 @@ namespace DotNetOpenAuth.Test { var timer = new MultiSampleCodeTimer(samples, iterations); Stats stats; using (new HighPerformance()) { - stats = timer.Measure(name ?? TestContext.CurrentContext.Test.FullName, action); + stats = timer.Measure(name ?? TestContext.CurrentContext.Test.FullName, action().Wait()); } stats.AdjustForScale(PerformanceTestUtilities.Baseline.Median); |