summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--test/lib/leakchecker.rb12
2 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index c74ef0e2a7..311cc43a67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Jun 14 04:40:32 2015 Benoit Daloze <eregontp@gmail.com>
+
+ * test/lib/leakchecker.rb (check): refactor.
+
Sun Jun 14 04:34:14 2015 Benoit Daloze <eregontp@gmail.com>
* test/lib/leakchecker.rb: Return false for no leaks.
diff --git a/test/lib/leakchecker.rb b/test/lib/leakchecker.rb
index 74244b33dc..fbdff2d2a3 100644
--- a/test/lib/leakchecker.rb
+++ b/test/lib/leakchecker.rb
@@ -7,11 +7,13 @@ class LeakChecker
end
def check(test_name)
- leaked1 = check_fd_leak(test_name)
- leaked2 = check_thread_leak(test_name)
- leaked3 = check_tempfile_leak(test_name)
- leaked4 = check_env(test_name)
- GC.start if leaked1 || leaked2 || leaked3 || leaked4
+ leaks = [
+ check_fd_leak(test_name),
+ check_thread_leak(test_name),
+ check_tempfile_leak(test_name),
+ check_env(test_name)
+ ]
+ GC.start if leaks.any?
end
def find_fds