From: Miguel A. B. L. <ari...@us...> - 2007-11-12 19:17:53
|
Update of /cvsroot/arianne/marauroa/tests/marauroa/server/net In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv1273/tests/marauroa/server/net Modified Files: NetworkManagerTest.java Log Message: Explained how to correctly run the test cases. Enforce order in System test. Index: NetworkManagerTest.java =================================================================== RCS file: /cvsroot/arianne/marauroa/tests/marauroa/server/net/NetworkManagerTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NetworkManagerTest.java 11 Nov 2007 19:59:28 -0000 1.4 --- NetworkManagerTest.java 12 Nov 2007 19:17:23 -0000 1.5 *************** *** 144,160 **** @Test public void sendMessageRubish() throws IOException, InvalidVersionException { ! Socket socket=new Socket("localhost", PORT); ! OutputStream out=socket.getOutputStream(); ! ! byte[] tmp=new byte[1024]; ! for(int i=0; i<1024; i++) { ! tmp[i]=(byte)(255*Math.random()); } - - out.write(tmp); - out.flush(); - socket.close(); - - sendMessageC2S(); } } --- 144,163 ---- @Test public void sendMessageRubish() throws IOException, InvalidVersionException { ! /* Send 256 rubish messages, just to make sure. */ ! for (int j = 0; j < 256; j++) { ! Socket socket = new Socket("localhost", PORT); ! OutputStream out = socket.getOutputStream(); ! ! byte[] tmp = new byte[1024]; ! for (int i = 0; i < 1024; i++) { ! tmp[i] = (byte) (255 * Math.random()); ! } ! ! out.write(tmp); ! out.flush(); ! socket.close(); ! ! sendMessageC2S(); } } } |