Mercurial > hg > RemoteEditor > REPSessionManager
changeset 230:43445986113b
*** empty log message ***
author | kent |
---|---|
date | Sun, 31 Aug 2008 17:54:52 +0900 |
parents | f816e0cbe6fd |
children | b837feb00132 |
files | test/channeltest/testNetworkSimulator.java test/channeltest/testSeMa.java test/channeltest/testSeMaSlave.java |
diffstat | 3 files changed, 8 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/test/channeltest/testNetworkSimulator.java Sun Aug 31 17:08:55 2008 +0900 +++ b/test/channeltest/testNetworkSimulator.java Sun Aug 31 17:54:52 2008 +0900 @@ -16,7 +16,7 @@ public static void main(String[] args){ REPServerSocketChannel.isSimulation = false; - testNetworkSimulator testns = new testNetworkSimulator(1, 3, 50); + testNetworkSimulator testns = new testNetworkSimulator(3, 10, 70); logger.setLogLevel(5); testns.startTest(); @@ -81,11 +81,11 @@ private void sleep(int time) { - synchronized (this) { - try { - wait(time); - } catch (InterruptedException e) { - } + try { + Thread.sleep(time); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); } }
--- a/test/channeltest/testSeMa.java Sun Aug 31 17:08:55 2008 +0900 +++ b/test/channeltest/testSeMa.java Sun Aug 31 17:54:52 2008 +0900 @@ -58,7 +58,7 @@ while(running){ try { - selector.select(); + selector.select(2000); Set<REPSelectionKey<String>> set = selector.selectedKeys1(); for(REPSelectionKey<String> key : set) { @@ -70,7 +70,6 @@ ns.writeLog("accepts a client.", 1); }else if(key.isReadable()){ - ns.writeLog("gets readable channel", 1); REPSocketChannel<String> channel = (REPSocketChannel<String>) key.channel(pack); String packet; packet = channel.read();
--- a/test/channeltest/testSeMaSlave.java Sun Aug 31 17:08:55 2008 +0900 +++ b/test/channeltest/testSeMaSlave.java Sun Aug 31 17:54:52 2008 +0900 @@ -54,7 +54,7 @@ /* Main Loop */ while(running){ - selector.select(); + selector.select(2000); for(REPSelectionKey<String> key : selector.selectedKeys1()){ @@ -66,7 +66,6 @@ ns.writeLog("accepts a client.", 1); }else if(key.isReadable()){ - ns.writeLog("gets readable channel", 1); REPSocketChannel<String> channel = (REPSocketChannel<String>) key.channel(pack); String packet = channel.read(); if (packet==null) continue;