Class: GroongaQueryLog::Command::RunRegressionTest::Tester
- Inherits:
-
Object
- Object
- GroongaQueryLog::Command::RunRegressionTest::Tester
- Includes:
- Loggable
- Defined in:
- lib/groonga-query-log/command/run-regression-test.rb
Instance Method Summary collapse
-
#initialize(old, new, options) ⇒ Tester
constructor
A new instance of Tester.
- #run ⇒ Object
Methods included from Loggable
Constructor Details
#initialize(old, new, options) ⇒ Tester
Returns a new instance of Tester.
515 516 517 518 519 520 521 522 523 524 |
# File 'lib/groonga-query-log/command/run-regression-test.rb', line 515 def initialize(old, new, ) @old = old @new = new @input_directory = [:input_directory] || Pathname.new(".") @working_directory = [:working_directory] || Pathname.new(".") @n_clients = [:n_clients] || 1 @stop_on_failure = [:stop_on_failure] @options = @n_ready_waits = 2 end |
Instance Method Details
#run ⇒ Object
526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 |
# File 'lib/groonga-query-log/command/run-regression-test.rb', line 526 def run @old.ensure_database @new.ensure_database old_thread = Thread.new do @old.run do run_test end end new_thread = Thread.new do @new.run do run_test end end old_thread_success = old_thread.value new_thread_success = new_thread.value old_thread_success and new_thread_success end |