PageRenderTime 96ms CodeModel.GetById 21ms app.highlight 70ms RepoModel.GetById 1ms app.codeStats 1ms

/protocols/ss7/map/map-impl/src/test/java/org/mobicents/protocols/ss7/map/functional/MAPFunctionalTest.java

http://mobicents.googlecode.com/
Java | 577 lines | 326 code | 78 blank | 173 comment | 4 complexity | 9565f25359e91a9710effc06560ae217 MD5 | raw file
  1/*
  2 * JBoss, Home of Professional Open Source
  3 * Copyright 2011, Red Hat, Inc. and individual contributors
  4 * by the @authors tag. See the copyright.txt in the distribution for a
  5 * full listing of individual contributors.
  6 *
  7 * This is free software; you can redistribute it and/or modify it
  8 * under the terms of the GNU Lesser General Public License as
  9 * published by the Free Software Foundation; either version 2.1 of
 10 * the License, or (at your option) any later version.
 11 *
 12 * This software is distributed in the hope that it will be useful,
 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 15 * Lesser General Public License for more details.
 16 *
 17 * You should have received a copy of the GNU Lesser General Public
 18 * License along with this software; if not, write to the Free
 19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 21 */
 22
 23package org.mobicents.protocols.ss7.map.functional;
 24
 25import static org.testng.Assert.assertTrue;
 26import static org.testng.Assert.fail;
 27
 28import java.io.InputStream;
 29import java.util.Date;
 30import java.util.Properties;
 31
 32import org.apache.log4j.BasicConfigurator;
 33import org.apache.log4j.Logger;
 34import org.apache.log4j.PropertyConfigurator;
 35import org.mobicents.protocols.ss7.indicator.RoutingIndicator;
 36import org.mobicents.protocols.ss7.map.MAPStackImpl;
 37import org.mobicents.protocols.ss7.sccp.impl.SccpHarness;
 38import org.mobicents.protocols.ss7.sccp.parameter.SccpAddress;
 39import org.testng.annotations.AfterClass;
 40import org.testng.annotations.AfterTest;
 41import org.testng.annotations.BeforeClass;
 42import org.testng.annotations.BeforeTest;
 43import org.testng.annotations.Test;
 44
 45/**
 46 * 
 47 * @author amit bhayani
 48 * @author sergey vetyutnev
 49 * 
 50 */
 51public class MAPFunctionalTest extends SccpHarness {
 52
 53	private static Logger logger = Logger.getLogger(MAPFunctionalTest.class);
 54	protected static final String USSD_STRING = "*133#";
 55	protected static final String USSD_MENU = "Select 1)Wallpaper 2)Ringtone 3)Games";
 56	private static final int _WAIT_TIMEOUT = 5000;
 57
 58	private MAPStackImpl stack1;
 59	private MAPStackImpl stack2;
 60	private SccpAddress peer1Address;
 61	private SccpAddress peer2Address;
 62	private Client client;
 63	private Server server;
 64
 65	@BeforeClass
 66	public void setUpClass() throws Exception {
 67
 68		System.out.println("setUpClass");
 69	}
 70
 71	@AfterClass
 72	public void tearDownClass() throws Exception {
 73		System.out.println("tearDownClass");
 74	}
 75
 76	/*
 77	 * (non-Javadoc)
 78	 * 
 79	 * @see junit.framework.TestCase#setUp()
 80	 */
 81	@BeforeTest
 82	public void setUp() {
 83		// this.setupLog4j();
 84		System.out.println("setUpTest");
 85		
 86		this.sccpStack1Name = "MAPFunctionalTestSccpStack1";
 87		this.sccpStack2Name = "MAPFunctionalTestSccpStack2";
 88		
 89		super.setUp();
 90
 91		// this.setupLog4j();
 92
 93		// create some fake addresses.
 94		
 95
 96		peer1Address = new SccpAddress(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, 1, null, 8);
 97		peer2Address = new SccpAddress(RoutingIndicator.ROUTING_BASED_ON_DPC_AND_SSN, 2, null, 8);
 98
 99		this.stack1 = new MAPStackImplWrapper(this.sccpProvider1, 8);
100		this.stack2 = new MAPStackImplWrapper(this.sccpProvider2, 8);
101
102		this.stack1.start();
103		this.stack2.start();
104		// create test classes
105		this.client = new Client(this.stack1, this, peer1Address, peer2Address);
106		this.server = new Server(this.stack2, this, peer2Address, peer1Address);
107	}
108
109	/*
110	 * (non-Javadoc)
111	 * 
112	 * @see junit.framework.TestCase#tearDown()
113	 */
114
115	@AfterTest
116	public void tearDown() {
117		System.out.println("tearDownTest");
118		this.stack1.stop();
119		this.stack2.stop();
120		super.tearDown();
121	}
122	
123	private void setupLog4j() {
124
125		InputStream inStreamLog4j = getClass().getResourceAsStream("/log4j.properties");
126
127		Properties propertiesLog4j = new Properties();
128
129		try {
130			propertiesLog4j.load(inStreamLog4j);
131			PropertyConfigurator.configure(propertiesLog4j);
132		} catch (Exception e) {
133			e.printStackTrace();
134			BasicConfigurator.configure();
135		}
136
137		logger.debug("log4j configured");
138
139	}
140
141
142	@Test(groups = { "functional.flow","dialog"})
143	public void testSimpleTCWithDialog() throws Exception {
144		server.setStep(FunctionalTestScenario.Action_Dialog_A);
145		client.setStep(FunctionalTestScenario.Action_Dialog_A);
146		client.actionA();
147		client.start();
148		waitForEnd();
149		assertTrue( client.isFinished(),"Client side did not finish: " + client.getStatus());
150		assertTrue( server.isFinished(),"Server side did not finish: " + server.getStatus());
151
152	}
153
154	@Test(groups = { "functional.flow","dialog"})
155	public void testComplexTCWithDialog() throws Exception {
156		
157//		this.saveTrafficInFile();
158		
159		server.reset();
160		client.reset();
161		server.setStep(FunctionalTestScenario.Action_Dialog_A);
162		client.setStep(FunctionalTestScenario.Action_Dialog_A);
163		client.actionA();
164		waitForEnd();
165		assertTrue( client.isFinished(),"Client side did not finish: " + client.getStatus());
166		assertTrue( server.isFinished(),"Server side did not finish: " + server.getStatus());
167
168		server.reset();
169		client.reset();
170		server.setStep(FunctionalTestScenario.Action_Dialog_B);
171		client.setStep(FunctionalTestScenario.Action_Dialog_B);
172		client.actionB();
173		waitForEnd();
174		assertTrue( client.isFinished(),"Client side did not finish: " + client.getStatus());
175		assertTrue( server.isFinished(),"Server side did not finish: " + server.getStatus());
176
177		((MAPServiceSupplementaryImplWrapper) this.stack2.getMAPProvider().getMAPServiceSupplementary()).setTestMode(1);
178		server.reset();
179		client.reset();
180		server.setStep(FunctionalTestScenario.Action_Dialog_C);
181		client.setStep(FunctionalTestScenario.Action_Dialog_C);
182		client.actionB();
183		waitForEnd();
184		assertTrue( client.isFinished(),"Client side did not finish: " + client.getStatus());
185		assertTrue( server.isFinished(),"Server side did not finish: " + server.getStatus());
186		((MAPServiceSupplementaryImplWrapper) this.stack2.getMAPProvider().getMAPServiceSupplementary()).setTestMode(0);
187
188		server.reset();
189		client.reset();
190		server.setStep(FunctionalTestScenario.Action_Dialog_D);
191		client.setStep(FunctionalTestScenario.Action_Dialog_D);
192		client.actionB();
193		waitForEnd();
194		assertTrue( client.isFinished(),"Client side did not finish: " + client.getStatus());
195		assertTrue( server.isFinished(),"Server side did not finish: " + server.getStatus());
196
197		server.reset();
198		client.reset();
199		server.setStep(FunctionalTestScenario.Action_Dialog_E);
200		client.setStep(FunctionalTestScenario.Action_Dialog_E);
201		client.actionB();
202		waitForEnd();
203		assertTrue( client.isFinished(),"Client side did not finish: " + client.getStatus());
204		assertTrue( server.isFinished(),"Server side did not finish: " + server.getStatus());
205
206		((MAPProviderImplWrapper) this.stack2.getMAPProvider()).setTestMode(1);
207		server.reset();
208		client.reset();
209		server.setStep(FunctionalTestScenario.Action_Dialog_F);
210		client.setStep(FunctionalTestScenario.Action_Dialog_F);
211		client.actionB();
212		waitForEnd();
213		assertTrue(client.isFinished(), "Client side did not finish: " + client.getStatus());
214		assertTrue(server.isFinished(), "Server side did not finish: " + server.getStatus());
215		((MAPProviderImplWrapper) this.stack2.getMAPProvider()).setTestMode(0);
216
217		server.reset();
218		client.reset();
219		server.setStep(FunctionalTestScenario.Action_Dialog_Eri);
220		client.setStep(FunctionalTestScenario.Action_Dialog_Eri);
221		client.actionBB();
222		waitForEnd();
223		assertTrue(client.isFinished(), "Client side did not finish: " + client.getStatus());
224		assertTrue(server.isFinished(), "Server side did not finish: " + server.getStatus());
225	}
226
227	@Test(groups = { "functional.flow","dialog"})
228	public void testComponents() throws Exception {
229		
230		server.reset();
231		client.reset();
232		server.setStep(FunctionalTestScenario.Action_Component_A);
233		client.setStep(FunctionalTestScenario.Action_Component_A);
234		client.actionB();
235		waitForEnd();
236		assertTrue(client.isFinished(),"Client side did not finish: " + client.getStatus());
237		assertTrue(server.isFinished(),"Server side did not finish: " + server.getStatus());
238
239		server.reset();
240		client.reset();
241		server.setStep(FunctionalTestScenario.Action_Component_B);
242		client.setStep(FunctionalTestScenario.Action_Component_B);
243		client.actionB();
244		waitForEnd();
245		assertTrue(client.isFinished(),"Client side did not finish: " + client.getStatus());
246		assertTrue(server.isFinished(),"Server side did not finish: " + server.getStatus());
247
248		server.reset();
249		client.reset();
250		server.setStep(FunctionalTestScenario.Action_Component_D);
251		client.setStep(FunctionalTestScenario.Action_Component_D);
252		client.actionB();
253		waitForEnd();
254		assertTrue(client.isFinished(),"Client side did not finish: " + client.getStatus());
255		assertTrue(server.isFinished(),"Server side did not finish: " + server.getStatus());
256
257		server.reset();
258		client.reset();
259		server.setStep(FunctionalTestScenario.Action_Component_E);
260		client.setStep(FunctionalTestScenario.Action_Component_E);
261		client.actionB();
262		waitForEnd();
263		assertTrue(client.isFinished(),"Client side did not finish: " + client.getStatus());
264		assertTrue(server.isFinished(),"Server side did not finish: " + server.getStatus());
265
266		server.reset();
267		client.reset();
268		server.setStep(FunctionalTestScenario.Action_Component_F);
269		client.setStep(FunctionalTestScenario.Action_Component_F);
270		client.actionB();
271		waitForEnd();
272		assertTrue(client.isFinished(),"Client side did not finish: " + client.getStatus());
273		assertTrue(server.isFinished(),"Server side did not finish: " + server.getStatus());
274
275		server.reset();
276		client.reset();
277		server.setStep(FunctionalTestScenario.Action_Component_G);
278		client.setStep(FunctionalTestScenario.Action_Component_G);
279		client.actionB();
280		waitForEnd();
281		assertTrue(client.isFinished(),"Client side did not finish: " + client.getStatus());
282		assertTrue(server.isFinished(),"Server side did not finish: " + server.getStatus());
283
284	}
285
286	@Test
287	public void testV1() throws Exception {
288
289		server.reset();
290		client.reset();
291		server.setStep(FunctionalTestScenario.Action_V1_A);
292		client.setStep(FunctionalTestScenario.Action_V1_A);
293		client.actionD();
294		waitForEnd();
295		assertTrue(client.isFinished(),"Client side did not finish: " + client.getStatus());
296		assertTrue(server.isFinished(),"Server side did not finish: " + server.getStatus());
297
298		server.reset();
299		client.reset();
300		server.setStep(FunctionalTestScenario.Action_V1_B);
301		client.setStep(FunctionalTestScenario.Action_V1_B);
302		client.actionD();
303		waitForEnd();
304		assertTrue(client.isFinished(),"Client side did not finish: " + client.getStatus());
305		assertTrue(server.isFinished(),"Server side did not finish: " + server.getStatus());
306
307		server.reset();
308		client.reset();
309		server.setStep(FunctionalTestScenario.Action_V1_C);
310		client.setStep(FunctionalTestScenario.Action_V1_C);
311		client.actionD();
312		waitForEnd();
313		assertTrue(client.isFinished(),"Client side did not finish: " + client.getStatus());
314		assertTrue(server.isFinished(),"Server side did not finish: " + server.getStatus());
315		
316		server.reset();
317		client.reset();
318		server.setStep(FunctionalTestScenario.Action_V1_D);
319		client.setStep(FunctionalTestScenario.Action_V1_D);
320		client.actionD();
321		waitForEnd();
322		assertTrue(client.isFinished(),"Client side did not finish: " + client.getStatus());
323		assertTrue(server.isFinished(),"Server side did not finish: " + server.getStatus());
324
325		server.reset();
326		client.reset();
327		server.setStep(FunctionalTestScenario.Action_V1_E);
328		client.setStep(FunctionalTestScenario.Action_V1_E);
329		client.actionD();
330		waitForEnd();
331		assertTrue(client.isFinished(),"Client side did not finish: " + client.getStatus());
332		assertTrue(server.isFinished(),"Server side did not finish: " + server.getStatus());
333	}
334
335	@Test(groups = { "functional.flow","dialog"})
336	public void testSmsService() throws Exception {
337		server.reset();
338		client.reset();
339		server.setStep(FunctionalTestScenario.Action_Sms_AlertServiceCentre);
340		client.setStep(FunctionalTestScenario.Action_Sms_AlertServiceCentre);
341		client.actionC();
342		waitForEnd();
343		assertTrue( client.isFinished(),"Client side did not finish: " + client.getStatus());
344		assertTrue( server.isFinished(),"Server side did not finish: " + server.getStatus());
345		
346		server.reset();
347		client.reset();
348		server.setStep(FunctionalTestScenario.Action_Sms_ForwardSM);
349		client.setStep(FunctionalTestScenario.Action_Sms_ForwardSM);
350		client.actionC();
351		waitForEnd();
352		assertTrue( client.isFinished(),"Client side did not finish: " + client.getStatus());
353		assertTrue( server.isFinished(),"Server side did not finish: " + server.getStatus());
354		
355		server.reset();
356		client.reset();
357		server.setStep(FunctionalTestScenario.Action_Sms_MoForwardSM);
358		client.setStep(FunctionalTestScenario.Action_Sms_MoForwardSM);
359		client.actionC();
360		waitForEnd();
361		assertTrue( client.isFinished(),"Client side did not finish: " + client.getStatus());
362		assertTrue( server.isFinished(),"Server side did not finish: " + server.getStatus());
363		
364		server.reset();
365		client.reset();
366		server.setStep(FunctionalTestScenario.Action_Sms_MtForwardSM);
367		client.setStep(FunctionalTestScenario.Action_Sms_MtForwardSM);
368		client.actionC();
369		waitForEnd();
370		assertTrue( client.isFinished(),"Client side did not finish: " + client.getStatus());
371		assertTrue( server.isFinished(),"Server side did not finish: " + server.getStatus());
372		
373		server.reset();
374		client.reset();
375		server.setStep(FunctionalTestScenario.Action_Sms_ReportSMDeliveryStatus);
376		client.setStep(FunctionalTestScenario.Action_Sms_ReportSMDeliveryStatus);
377		client.actionC();
378		waitForEnd();
379		assertTrue( client.isFinished(),"Client side did not finish: " + client.getStatus());
380		assertTrue( server.isFinished(),"Server side did not finish: " + server.getStatus());
381		
382		server.reset();
383		client.reset();
384		server.setStep(FunctionalTestScenario.Action_Sms_SendRoutingInfoForSM);
385		client.setStep(FunctionalTestScenario.Action_Sms_SendRoutingInfoForSM);
386		client.actionC();
387		waitForEnd();
388		assertTrue( client.isFinished(),"Client side did not finish: " + client.getStatus());
389		assertTrue( server.isFinished(),"Server side did not finish: " + server.getStatus());
390	}
391
392	@Test(groups = { "functional.flow","dialog"})
393	public void testMsgLength() throws Exception {
394		
395//		this.saveTrafficInFile();
396		
397		server.reset();
398		client.reset();
399		server.setStep(FunctionalTestScenario.Action_TestMsgLength_A);
400		client.setStep(FunctionalTestScenario.Action_TestMsgLength_A);
401		client.actionE();
402		waitForEnd();
403		assertTrue(client.isFinished(),"Client side did not finish: " + client.getStatus());
404		assertTrue(server.isFinished(),"Server side did not finish: " + server.getStatus());
405		
406		server.reset();
407		client.reset();
408		server.setStep(FunctionalTestScenario.Action_TestMsgLength_B);
409		client.setStep(FunctionalTestScenario.Action_TestMsgLength_B);
410		client.actionE();
411		waitForEnd();
412		assertTrue(client.isFinished(),"Client side did not finish: " + client.getStatus());
413		assertTrue(server.isFinished(),"Server side did not finish: " + server.getStatus());
414	}
415
416	@Test(groups = { "functional.flow","dialog"})
417	public void testA() throws Exception {
418
419//		MAPParameterFactory msf = this.stack1.getMAPProvider().getMAPParameterFactory();
420//		IMEI a1 = msf.createIMEI("12345678901234");
421//
422//		AsnOutputStream aos = new AsnOutputStream();
423//		a1.encode(aos);
424//		byte[] buf = aos.toByteArray();
425//
426//		AsnInputStream ais = new AsnInputStream(new ByteArrayInputStream(buf));
427//		IMEIImpl a11 = new IMEIImpl();
428//		a11.decode(ais, 0, false, 0, buf.length);
429//
430//		 int fff=0;
431//		 fff++;
432		
433//		MAPParameterFactory msf = this.stack1.getMAPProvider().getMAPParameterFactory();
434//
435//		ISDNAddressString n1 = msf.createISDNAddressString(AddressNature.subscriber_number, NumberingPlan.ISDN, "98765");
436//		LMSI n2 = msf.createLMSI(new byte[] { 21, 22, 23, 24 });
437//		ISDNAddressString n3 = msf.createISDNAddressString(AddressNature.network_specific_number, NumberingPlan.land_mobile, "7654321");
438//		
439//		LocationInfoWithLMSI a1 = msf.createLocationInfoWithLMSI(n1, n2, MAPFunctionalTest.GetTestExtensionContainer(msf), AdditionalNumberType.msc, n3);		
440//
441//		AsnOutputStream aos = new AsnOutputStream();
442//		a1.encode(aos);
443//		byte[] buf = aos.toByteArray();
444//
445//		AsnInputStream ais = new AsnInputStream(new ByteArrayInputStream(buf));
446//		LocationInfoWithLMSIImpl a11 = new LocationInfoWithLMSIImpl();
447//		a11.decode(ais, 0, false, 0, buf.length);
448//		
449//		boolean b1 = MAPFunctionalTest.CheckTestExtensionContainer(a11.getExtensionContainer());
450//		int fff=0;
451//		fff++;
452		
453		
454//		MAPParameterFactory msf = this.stack1.getMAPProvider().getMAPParameterFactory();
455//		MAPOpenInfoImpl a1 = new MAPOpenInfoImpl();
456//		a1.setExtensionContainer(MAPFunctionalTest.GetTestExtensionContainer(msf));
457//		AddressString n1 = msf.createAddressString(AddressNature.subscriber_number, NumberingPlan.ISDN, "1234567"); 		
458//		AddressString n2 = msf.createAddressString(AddressNature.network_specific_number, NumberingPlan.land_mobile, "7654321");
459//		a1.setOrigReference(n1); 		
460//		a1.setDestReference(n2); 		
461//
462//		AsnOutputStream aos = new AsnOutputStream();
463//		a1.encode(aos);
464//		byte[] buf = aos.toByteArray();
465//
466//		AsnInputStream ais = new AsnInputStream(new ByteArrayInputStream(buf));
467//		MAPOpenInfoImpl a11 = new MAPOpenInfoImpl();
468//		int tag = ais.readTag();
469//		a11.decode(ais);
470//		
471//		boolean b1 = MAPFunctionalTest.CheckTestExtensionContainer(a11.getExtensionContainer());
472//		
473//		int fff=0;
474//		fff++;
475
476		
477//		MAPParameterFactory msf = this.stack1.getMAPProvider().getMAPParameterFactory();
478//		ISDNAddressString a1 = msf.createISDNAddressString(AddressNature.subscriber_number, NumberingPlan.ISDN, "98765");
479//
480//		AsnOutputStream aos = new AsnOutputStream();
481//		a1.encode(aos);
482//		byte[] buf = aos.toByteArray();
483//
484//		AsnInputStream ais = new AsnInputStream(new ByteArrayInputStream(buf));
485//		ISDNAddressString a2 = new ISDNAddressStringImpl();
486//		a2.decode(ais, 0, true, 0, buf.length);
487//		
488//		int fff=0;
489//		fff++;
490
491		
492//		MAPParameterFactory msf = this.stack1.getMAPProvider().getMAPParameterFactory();
493//		
494////		AddressString asx = msf.createAddressString(AddressNature.subscriber_number, NumberingPlan.ISDN, "98765");
495////		SM_RP_DAImpl sm = (SM_RP_DAImpl)msf.createSM_RP_DA(asx);
496//		
497////		IMSIImpl imsi = (IMSIImpl)msf.createIMSI(250L, 7L, "12345");
498////		SM_RP_DAImpl sm = (SM_RP_DAImpl)msf.createSM_RP_DA(imsi);
499//
500////		byte[] data = new byte[] { 31, 32, 33, 34 };
501////		LMSIImpl lmsi = (LMSIImpl)msf.createLMSI(data);
502////		SM_RP_DAImpl sm = (SM_RP_DAImpl)msf.createSM_RP_DA(lmsi);
503//		
504////		SM_RP_DAImpl sm = (SM_RP_DAImpl)msf.createSM_RP_DA();
505//		
506////		LMSIImpl lmsi = new LMSIImpl();
507////		byte[] data = new byte[] { 31, 32, 33, 34 };
508////		lmsi.setData(data);
509////		sm.setLMSI(lmsi);
510//		
511//		SM_RP_OAImpl sm = (SM_RP_OAImpl)msf.createSM_RP_OA();
512//
513////		ISDNAddressString msisdn = msf.createISDNAddressString(AddressNature.subscriber_number, NumberingPlan.ISDN, "98765");
514////		sm.setMsisdn(msisdn);
515////		AddressString serviceCentreAddressOA = msf.createAddressString(AddressNature.subscriber_number, NumberingPlan.ISDN, "98765");
516////		sm.setServiceCentreAddressOA(serviceCentreAddressOA);
517//
518//		
519//		AsnOutputStream aos = new AsnOutputStream();
520//		sm.encode(aos);
521//		byte[] buf = aos.toByteArray();
522//		
523//		aos.reset();
524//		aos.writeTag(Tag.CLASS_CONTEXT_SPECIFIC, true, sm.getEnccodingTag());
525//		aos.writeLength(buf.length);
526//		aos.write(buf);
527//		buf = aos.toByteArray();
528//		
529//
530//		AsnInputStream ais = new AsnInputStream(new ByteArrayInputStream(buf));
531//		int tag = ais.readTag();
532//		int length = ais.readLength();
533//		if (length != ais.available()) {
534//			int fff = 0;
535//		}
536//		byte[] buf2 = new byte[length];
537//		ais.read(buf2);
538//		AsnInputStream ais2 = new AsnInputStream(new ByteArrayInputStream(buf2));
539//		
540////		SM_RP_DAImpl sm2 = new SM_RP_DAImpl();
541//		SM_RP_OAImpl sm2 = new SM_RP_OAImpl();
542//		sm2.setDecodedTag(tag);
543//		sm2.decode(ais2);
544//		
545//		int iii=0;
546//		iii++;
547
548		
549//		server.reset();
550//		client.reset();
551//		server.setStep(FunctionalTestScenario.Action_Component_A);
552//		client.setStep(FunctionalTestScenario.Action_Component_A);
553//		client.actionC();
554//		waitForEnd();
555//		assertTrue( client.isFinished(),"Client side did not finish: " + client.getStatus());
556//		assertTrue( server.isFinished(),"Server side did not finish: " + server.getStatus());
557	}
558	
559	private void waitForEnd() {
560		try {
561			Date startTime = new Date();
562			while (true) {
563				if (client.isFinished() && server.isFinished())
564					break;
565
566				Thread.currentThread().sleep(100);
567
568				if (new Date().getTime() - startTime.getTime() > _WAIT_TIMEOUT)
569					break;
570
571//				 Thread.currentThread().sleep(1000000);
572			}
573		} catch (InterruptedException e) {
574			fail("Interrupted on wait!");
575		}
576	}
577}