describe "Simple networking api" do it "should provide a framework for running remote apps" do FACTOR=200000 b1=TestBed.new b2=TestBed.new ["NodeBroadcast","NetworkDiscoveryUdp","NetworkDiscovery","UdpNetwork"].each{|n| b1.run(n) b2.run(n) } sleep 3 n1=b1.getApp(:fullNetworkNode).api n2=b2.getApp(:fullNetworkNode).api service1=n1.hook("test1"){|arg| arg.should == "test1Arg"*FACTOR "testRet"*FACTOR } puts "TESTTTTTTTTTTTTTTTTTTT" measureTime { n2.send(n1.me,"test1","test1Arg"*FACTOR).wait.should == "testRet"*FACTOR } b1.stop b2.stop end end