Navigation Menu

Skip to content

Commit

Permalink
verify-server: add --ignore-drilldown-key option
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jun 13, 2018
1 parent cb3fb89 commit 764234e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 8 additions & 1 deletion lib/groonga-query-log/command/verify-server.rb
@@ -1,4 +1,4 @@
# Copyright (C) 2013-2017 Kouhei Sutou <kou@clear-code.com>
# Copyright (C) 2013-2018 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -138,6 +138,13 @@ def create_parser
@options.verify_cache = verify_cache
end

parser.on("--ignore-drilldown-key=KEY",
"Don't compare drilldown result for KEY",
"You can specify multiple drilldown keys by",
"specifying this option multiple times") do |key|
@options.ignored_drilldown_keys << key
end

parser.separator("Debug options:")
parser.separator("")

Expand Down
5 changes: 4 additions & 1 deletion lib/groonga-query-log/server-verifier.rb
@@ -1,4 +1,4 @@
# Copyright (C) 2013-2017 Kouhei Sutou <kou@clear-code.com>
# Copyright (C) 2013-2018 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -135,6 +135,7 @@ def verify_command(groonga1_client, groonga2_client, command)
response2 = groonga2_client.execute(command)
compare_options = {
:care_order => @options.care_order,
:ignored_drilldown_keys => @options.ignored_drilldown_keys,
}
comparer = ResponseComparer.new(command, response1, response2,
compare_options)
Expand Down Expand Up @@ -173,6 +174,7 @@ class Options
attr_accessor :output_path
attr_accessor :care_order
attr_writer :verify_cache
attr_accessor :ignored_drilldown_keys
def initialize
@groonga1 = GroongaOptions.new
@groonga2 = GroongaOptions.new
Expand All @@ -193,6 +195,7 @@ def initialize
]
@care_order = true
@verify_cache = false
@ignored_drilldown_keys = []
end

def request_queue_size
Expand Down

0 comments on commit 764234e

Please sign in to comment.