Mercurial > hg > RemoteEditor > REPSessionManager
diff test/sematest/TestSessionManager.java @ 281:c3969dd625b2
GUIless test routine.
author | kono |
---|---|
date | Sat, 27 Sep 2008 22:55:13 +0900 |
parents | a549bd4dadb8 |
children | c410eda661e8 |
line wrap: on
line diff
--- a/test/sematest/TestSessionManager.java Sat Sep 27 15:59:11 2008 +0900 +++ b/test/sematest/TestSessionManager.java Sat Sep 27 22:55:13 2008 +0900 @@ -6,6 +6,8 @@ import rep.REP; import rep.REPCommand; import rep.SessionManager; +import rep.SessionManagerEvent; +import rep.SessionManagerGUI; import rep.channel.REPLogger; import rep.channel.REPServerSocketChannel; @@ -25,7 +27,7 @@ while(!isStart){ try { - Thread.sleep(50); + Thread.sleep(5); } catch (InterruptedException e) { e.printStackTrace(); } @@ -74,13 +76,14 @@ port = Integer.parseInt(strs[0]); } - SessionManager sm = new SessionManager(port); - sm.openSelector(); - sm.init(port,new testGUI(sm)); + SessionManager sm = new SessionManager(); + SessionManagerGUI gui = new testGUI(sm); logger.writeLog("TestSessionManager.startSessionManager() : start SessionManager"); - isStart = true; - sm.mainLoop(); - + sm.syncExec(new SessionManagerEvent() { + // executed before first select(); + public void exec() { isStart = true; } + }); + sm.init(port,gui); } catch (InterruptedException e) { e.printStackTrace(); } catch (IOException e) {