public
Description: Rubinius, the Ruby VM
Homepage: http://rubini.us
Clone URL: git://github.com/evanphx/rubinius.git
Search Repo:
spec for DRb.stop_service to see if it clears the socket correctly
dgtized (author)
Mon Apr 28 09:56:47 -0700 2008
commit  4c8d6d90c69615386e26c71633e242f4e1f19342
tree    48adbb6c723a58c59c8e32252c3c2e0dbc1bcfe6
parent  03cb539f42f0b558fa29911c1dfc71ec5f2b183f
...
1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
0
@@ -1,2 +1,24 @@
0
 require File.dirname(__FILE__) + '/../../spec_helper'
0
+
0
+describe "DRb.stop_service" do
0
+ before :all do
0
+ # for concurrent processes
0
+ @port = 9001 + (Process.pid & 7 )
0
+ end
0
+
0
+ before :each do
0
+ # because each spec needs it's own port since DRb is broken that way as exhibited below
0
+ @url = "druby://localhost:#{@port}"
0
+ @port += 1
0
+ end
0
+
0
+ it "should correctly clear the port so a new server can start" do
0
+ 10.times do
0
+ server = nil
0
+ lambda { server = DRb.start_service(@url, TestServer.new) }.should_not raise_error
0
+ DRb.current_server.should == server
0
+ lambda { DRb.stop_service }.should_not raise_error
0
+ end
0
+ end
0
+end
...
 
...
1
0
@@ -1 +1,2 @@
0
+fails:DRb.stop_service should correctly clear the port so a new server can start

Comments

    No one has commented yet.