public
Description: Rubinius, the Ruby VM
Homepage: http://rubini.us
Clone URL: git://github.com/evanphx/rubinius.git
Search Repo:
Revert "Revert "Made DRb spec depend partially on PID so 
multiple runs don't clash.""

Apparently this is a supposed fix for concurrent spec runs, not for the 
spec failure

This reverts commit 08695d9a6940ab74f6eb8965e449a417002a42a6.
dgtized (author)
Mon Apr 28 09:20:17 -0700 2008
commit  03cb539f42f0b558fa29911c1dfc71ec5f2b183f
tree    067dd461713bfeddb7ff8c3eb7b96eed0dfe3d98
parent  6c811f8a9fd4c8f78fb470e2d945beabc202b2c7
...
3
4
5
 
 
 
 
 
6
7
8
 
9
10
 
11
12
13
14
...
15
16
17
18
 
19
20
 
21
22
23
...
3
4
5
6
7
8
9
10
11
12
 
13
14
 
15
16
17
18
19
...
20
21
22
 
23
24
 
25
26
27
28
0
@@ -3,11 +3,16 @@
0
 require 'drb'
0
 
0
 describe "DRb.start_service" do
0
+ before :all do
0
+ port = 9001 + (Process.pid & 7)
0
+ @url = "druby://localhost:#{port}"
0
+ end
0
+
0
   it "should run a basic remote call" do
0
     lambda { DRb.current_server }.should raise_error(DRb::DRbServerNotFound)
0
- server = DRb.start_service('druby://localhost:9001', TestServer.new)
0
+ server = DRb.start_service(@url, TestServer.new)
0
     DRb.current_server.should == server
0
- obj = DRbObject.new(nil, 'druby://localhost:9001')
0
+ obj = DRbObject.new(nil, @url)
0
     obj.add(1,2,3).should == 6
0
     DRb.stop_service
0
     lambda { DRb.current_server }.should raise_error(DRb::DRbServerNotFound)
0
0
@@ -15,9 +20,9 @@
0
 
0
   it "should run a basic remote call passing a block" do
0
     lambda { DRb.current_server }.should raise_error(DRb::DRbServerNotFound)
0
- server = DRb.start_service('druby://localhost:9001', TestServer.new)
0
+ server = DRb.start_service(@url, TestServer.new)
0
     DRb.current_server.should == server
0
- obj = DRbObject.new(nil, 'druby://localhost:9001')
0
+ obj = DRbObject.new(nil, @url)
0
     obj.add_yield(2) do |i|
0
       i.should == 2
0
       i+1

Comments

    No one has commented yet.