# HG changeset patch # User kono # Date 1219910087 -32400 # Node ID 5b4be02e72437fce1612cdd9849ce24866dc0582 # Parent 6a5974dd0368f4a00037322691ab0e336a4f1e5b *** empty log message *** diff -r 6a5974dd0368 -r 5b4be02e7243 test/channeltest/testNetworkSimulator.java --- a/test/channeltest/testNetworkSimulator.java Thu Aug 28 16:53:12 2008 +0900 +++ b/test/channeltest/testNetworkSimulator.java Thu Aug 28 16:54:47 2008 +0900 @@ -3,6 +3,7 @@ import java.util.ArrayList; import java.util.Random; import rep.channel.REPLogger; +import rep.channel.REPServerSocketChannel; public class testNetworkSimulator { private ArrayList semaList; @@ -14,6 +15,7 @@ static public REPLogger ns = new REPLogger(); public static void main(String[] args){ + REPServerSocketChannel.isSimulation = false; testNetworkSimulator testns = new testNetworkSimulator(3, 10, 50); testns.startTest(); @@ -31,19 +33,26 @@ } public void startTest(){ + int port = 11000; + int masterPort = port; + int slavePort; + String host = "localhost"; Random rand = new Random(); for (int i=0; i> channels; - public testSeMa(REPLogger _ns, String name, String host, int port){ + public testSeMa(String name, String host, int port){ super(name); IP = new InetSocketAddress(host,port); - ns = _ns; + ns = testNetworkSimulator.ns; channels = new LinkedList>(); } public void init(){ diff -r 6a5974dd0368 -r 5b4be02e7243 test/channeltest/testSeMaSlave.java --- a/test/channeltest/testSeMaSlave.java Thu Aug 28 16:53:12 2008 +0900 +++ b/test/channeltest/testSeMaSlave.java Thu Aug 28 16:54:47 2008 +0900 @@ -17,7 +17,7 @@ SocketAddress ownIP; SocketAddress masterIP; boolean running=true; - REPLogger ns = new REPLogger(); + REPLogger ns; LinkedList cis; public testSeMaSlave(String name, String oname,int oport, String mname,int mport){ @@ -25,6 +25,7 @@ ownIP = new InetSocketAddress(oname,oport); masterIP = new InetSocketAddress(mname,mport); cis = new LinkedList(); + ns = testNetworkSimulator.ns; } public void init(){