Navigation Menu

Skip to content

Commit

Permalink
run-regression-test: unify common code
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 24, 2017
1 parent 877fb43 commit 71b01df
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/groonga/query-log/command/run-regression-test.rb
Expand Up @@ -364,7 +364,7 @@ def run_test
puts("Running test against query log...: #{query_log_path}")
end
begin
if @old.use_persistent_cache? or @new.use_persistent_cache?
if use_persistent_cache?
callback = lambda do
if @old.use_persistent_cache?
@old.shutdown
Expand Down Expand Up @@ -409,7 +409,7 @@ def verify_server(test_log_path, query_log_path, &callback)
]
command_line << "--no-care-order" if @options[:care_order] == false
command_line << query_log_path.to_s
if @old.use_persistent_cache? or @new.use_persistent_cache?
if use_persistent_cache?
command_line << "--verify-cache"
end
verify_server = VerifyServer.new
Expand All @@ -423,6 +423,10 @@ def query_log_paths
def test_log_path(query_log_path)
@working_directory + "results" + query_log_path.basename
end

def use_persistent_cache?
@old.use_persistent_cache? or @new.use_persistent_cache?
end
end
end
end
Expand Down

0 comments on commit 71b01df

Please sign in to comment.