Skip to content

Commit 0e90e56

Browse files
committed
chore: add finally block
1 parent f177ff2 commit 0e90e56

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

tests/BenchmarkDotNet.IntegrationTests/WakeLockTests.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,14 @@ public async Task BenchmarkRunnerAcquiresWakeLock(Type type, string expected)
9999
async Task WaitForBenchmarkRunningAndGetPowerRequests()
100100
{
101101
await AsTask(ping, testTimeout);
102-
pwrRequests = GetPowerRequests("BenchmarkDotNet Running Benchmarks");
103-
pong.Set();
102+
try
103+
{
104+
pwrRequests = GetPowerRequests("BenchmarkDotNet Running Benchmarks");
105+
}
106+
finally
107+
{
108+
pong.Set();
109+
}
104110
}
105111
}
106112

0 commit comments

Comments
 (0)