Class: Drntest::TestExecutor

Inherits:
Object
  • Object
show all
Defined in:
lib/drntest/test-executor.rb

Defined Under Namespace

Classes: Context

Instance Method Summary collapse

Constructor Details

#initialize(config, test_path) ⇒ TestExecutor



23
24
25
26
# File 'lib/drntest/test-executor.rb', line 23

def initialize(config, test_path)
  @config = config
  @test_path = test_path
end

Instance Method Details

#executeObject



28
29
30
31
32
33
34
35
36
37
# File 'lib/drntest/test-executor.rb', line 28

def execute
  Droonga::Client.open(tag: @config.tag, port: @config.port) do |client|
    context = Context.new(client)
    operations.each do |operation|
      context.execute(operation)
    end
    context.finish
    context.responses
  end
end