[Groonga-commit] groonga/grntest at e35e76c [master] Close logs explicitly

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Apr 26 15:10:54 JST 2016


Kouhei Sutou	2016-04-26 15:10:54 +0900 (Tue, 26 Apr 2016)

  New Revision: e35e76ca8f9d58a6f47698f17720c6476b098a46
  https://github.com/groonga/grntest/commit/e35e76ca8f9d58a6f47698f17720c6476b098a46

  Message:
    Close logs explicitly

  Modified files:
    lib/grntest/execution-context.rb
    lib/grntest/test-runner.rb

  Modified: lib/grntest/execution-context.rb (+13 -0)
===================================================================
--- lib/grntest/execution-context.rb    2016-04-26 15:00:58 +0900 (aa8daf2)
+++ lib/grntest/execution-context.rb    2016-04-26 15:10:54 +0900 (ab47d72)
@@ -35,6 +35,7 @@ module Grntest
       @result = []
       @output_type = "json"
       @log = nil
+      @query_log = nil
       @on_error = :default
       @abort_tag = nil
       @omitted = false
@@ -99,5 +100,17 @@ module Grntest
     def abort
       throw @abort_tag
     end
+
+    def close_logs
+      if @log
+        @log.close
+        @log = nil
+      end
+
+      if @query_log
+        @query_log.close
+        @query_log = nil
+      end
+    end
   end
 end

  Modified: lib/grntest/test-runner.rb (+1 -0)
===================================================================
--- lib/grntest/test-runner.rb    2016-04-26 15:00:58 +0900 (cd3210a)
+++ lib/grntest/test-runner.rb    2016-04-26 15:10:54 +0900 (2481dde)
@@ -140,6 +140,7 @@ module Grntest
         check_memory_leak(context)
         result.omitted = context.omitted?
         result.actual = context.result
+        context.close_logs
       end
     end
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index