Mercurial > hg > RemoteEditor > REPSessionManager
view test/mergertest/TestUserSimulator.java @ 491:5945266c970d
before unMergedCmds fix , deadlockTimer API
author | one |
---|---|
date | Sat, 23 Oct 2010 12:34:46 +0900 |
parents | 5c95a9020e31 |
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(); } } }