Mercurial > hg > RemoteEditor > REPSessionManager
view test/mergertest/TestUserSimulator.java @ 420:5c95a9020e31
Modify ServerMainLoop
author | one |
---|---|
date | Fri, 13 Feb 2009 19:13:50 +0900 |
parents | |
children |
line wrap: on
line source
package test.mergertest; import java.util.LinkedList; import test.editortest.Logger; public class TestUserSimulator { /** * @param args */ public static void main(String[] args) { Logger.print(Thread.currentThread()); int en = 3; // int cn = 3; LinkedList<UserSimulator> userList = new LinkedList<UserSimulator>(); LinkedList<RemoteEditorSimulator> editorList = new LinkedList<RemoteEditorSimulator>(); for(int i = 0; i < en; i++){ RemoteEditorSimulator editor = new RemoteEditorSimulator(i); editorList.add(editor); userList.add(new UserSimulator(editor)); } for(UserSimulator user : userList){ user.start(); } for(UserSimulator user : userList){ try { user.join(); } catch (InterruptedException e) { e.printStackTrace(); } } for(RemoteEditorSimulator editor : editorList){ editor.display(); } } }