Skip to content

Commit

Permalink
fix dummy sever for example validation
Browse files Browse the repository at this point in the history
Review 639 by @neumino
Closes #1020
  • Loading branch information
Etienne Laurin committed Jun 17, 2013
1 parent c6b9ec7 commit 0bf546a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/rql/scripts/validate_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def validate_for(lang, port):
$LOAD_PATH.unshift('../../drivers/ruby/lib')
require 'rethinkdb.rb'
include RethinkDB::Shortcuts
conn = r.connect('localhost', %d)
conn = r.connect('host' => :localhost, :port => %d)
puts 'Running Ruby validation.'
""" % port)

Expand Down Expand Up @@ -125,6 +125,10 @@ def validate_for(lang, port):
class BlackHoleRDBHandler(SocketServer.BaseRequestHandler):
def handle(self):
magic = self.request.recv(4)
(length,) = struct.unpack("<L",self.request.recv(4))
if length != 0:
self.request.recv(length)
self.request.sendall("SUCCESS\0")

while (True):
header = self.request.recv(4)
Expand Down

0 comments on commit 0bf546a

Please sign in to comment.