spec/kestrel_server.rb in kjess-1.0.0 vs spec/kestrel_server.rb in kjess-1.1.0

- old
+ new

@@ -4,11 +4,11 @@ module KJess::Spec class KestrelServer class << self def version - "2.3.4" + "2.4.1" end def dir File.join( KJess::Spec.project_root, "kestrel/kestrel-#{version}" ) end @@ -16,11 +16,11 @@ def zip "#{dir}.zip" end def jar - File.join( dir, "kestrel_2.9.1-#{version}.jar" ) + File.join( dir, "kestrel_2.9.2-#{version}.jar" ) end def queue_path File.join( dir, 'data' ) end @@ -45,11 +45,13 @@ import com.twitter.ostrich.admin.config._ import net.lag.kestrel.config._ new KestrelConfig { listenAddress = "0.0.0.0" - memcacheListenPort = 22133 + memcacheListenPort = #{KJess::Spec.memcache_port} + textListenPort = #{KJess::Spec.text_port} + thriftListenPort = #{KJess::Spec.thrift_port} queuePath = "#{KJess::Spec::KestrelServer.queue_path}" clientTimeout = 30.seconds @@ -60,11 +62,11 @@ // default queue settings: default.defaultJournalSize = 16.megabytes default.maxMemorySize = 128.megabytes default.maxJournalSize = 1.gigabyte - admin.httpPort = 2223 + admin.httpPort = #{KJess::Spec.admin_port} admin.statsNodes = new StatsConfig { reporters = new TimeSeriesCollectorConfig } @@ -78,11 +80,11 @@ } _EOC end def get_response( path ) - uri = URI.parse( "http://localhost:2223/#{path}" ) + uri = URI.parse( "http://localhost:#{KJess::Spec.admin_port}/#{path}" ) resp = Net::HTTP.get_response( uri ) JSON.parse( resp.body ) end def start @@ -98,10 +100,11 @@ end def is_running? return "pong" == ping rescue Exception => e + #$stderr.puts e false end def is_stopped? return !is_running? @@ -127,11 +130,11 @@ def shutdown h = get_response( 'shutdown' ) return h['response'] == "ok" rescue => e + $stderr.puts e false end end - end end