[Groonga-commit] groonga/groonga-query-log at 5487d6f [master] run-regression-test: support HTTP error case

アーカイブの一覧に戻る
Yasuhiro Horimoto null+****@clear*****
Tue Nov 6 17:01:07 JST 2018


Yasuhiro Horimoto	2018-11-06 17:01:07 +0900 (Tue, 06 Nov 2018)

  Revision: 5487d6f39a93190f3d8f284ebd39826b4f4f6da2
  https://github.com/groonga/groonga-query-log/commit/5487d6f39a93190f3d8f284ebd39826b4f4f6da2

  Merged a90ef28: Merge pull request #35 from komainu8/improve_stop_on_failure

  Message:
    run-regression-test: support HTTP error case
    
    Improve "stop-on-failure" option so as to stop execute of tests even
    when cause HTTP errors.

  Modified files:
    lib/groonga-query-log/server-verifier.rb

  Modified: lib/groonga-query-log/server-verifier.rb (+5 -2)
===================================================================
--- lib/groonga-query-log/server-verifier.rb    2018-11-06 12:24:57 +0900 (5cbb6c8)
+++ lib/groonga-query-log/server-verifier.rb    2018-11-06 17:01:07 +0900 (885156d)
@@ -33,12 +33,13 @@ module GroongaQueryLog
 
     def verify(input, &callback)
       @same = true
+      @client_error = false
       producer = run_producer(input, &callback)
       reporter = run_reporter
       producer.join
       @different_results.push(nil)
       reporter.join
-      @same
+      @same and !@client_error
     end
 
     private
@@ -50,7 +51,7 @@ module GroongaQueryLog
         n_commands = 0
         callback_per_n_commands = 100
         parser.parse(input) do |statistic|
-          break if !@same and****@optio*****_on_failure?
+          break if (!@same or @client_error) and****@optio*****_on_failure?
 
           command = statistic.command
           next if command.nil?
@@ -99,6 +100,7 @@ module GroongaQueryLog
               log_client_error($!) do
                 $stderr.puts(original_source)
               end
+              @client_error = true
               return false
             end
             if****@optio*****_cache?
@@ -109,6 +111,7 @@ module GroongaQueryLog
                 log_client_error($!) do
                   $stderr.puts("status after #{original_source}")
                 end
+                @client_error = true
                 return false
               end
             end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20181106/616930e8/attachment-0001.html>


More information about the Groonga-commit mailing list
アーカイブの一覧に戻る