long elapsedTime= Long.parseLong(arg); fListener.testRunStopped(elapsedTime);
long elapsedTime = Long.parseLong(arg); notifyTestRunStopped(elapsedTime);
	private void receiveMessage(String message) {		if (message.startsWith(MessageIds.TRACE_START)) {			fInReadTrace= true;			fFailedTrace= ""; //$NON-NLS-1$			return;		}		if (message.startsWith(MessageIds.TRACE_END)) {			fInReadTrace= false;			fListener.testFailed(fFailureKind, fFailedTest, fFailedTrace);			fFailedTrace= ""; //$NON-NLS-1$			return;		}		if (fInReadTrace) {			fFailedTrace+= message + '\n';			return;		}				if (message.startsWith(MessageIds.RTRACE_START)) {			fInReadRerunTrace= true;			fFailedRerunTrace= ""; //$NON-NLS-1$			return;		}		if (message.startsWith(MessageIds.RTRACE_END)) {			fInReadRerunTrace= false;			return;		}		if (fInReadRerunTrace) {			fFailedRerunTrace+= message + '\n';			return;		}		String arg= message.substring(MessageIds.MSG_HEADER_LENGTH);		if (message.startsWith(MessageIds.TEST_RUN_START)) {			int count= Integer.parseInt(arg);			fListener.testRunStarted(count);			return;		}		if (message.startsWith(MessageIds.TEST_START)) {			fListener.testStarted(arg);			return;		}		if (message.startsWith(MessageIds.TEST_END)) {			fListener.testEnded(arg);			return;		}		if (message.startsWith(MessageIds.TEST_ERROR)) {			fFailedTest= arg;			fFailureKind= ITestRunListener.STATUS_ERROR;			return;		}		if (message.startsWith(MessageIds.TEST_FAILED)) {			fFailedTest= arg;			fFailureKind= ITestRunListener.STATUS_FAILURE;			return;		}		if (message.startsWith(MessageIds.TEST_RUN_END)) {			long elapsedTime= Long.parseLong(arg);			fListener.testRunEnded(elapsedTime);			return;		}		if (message.startsWith(MessageIds.TEST_STOPPED)) {			long elapsedTime= Long.parseLong(arg);			fListener.testRunStopped(elapsedTime);			shutDown();			return;		}		if (message.startsWith(MessageIds.TEST_TREE)) {			fListener.testTreeEntry(arg);			return;		}		if (message.startsWith(MessageIds.TEST_RERAN)) {			// format: className" "testName" "status			// status: FAILURE, ERROR, OK			int c= arg.indexOf(" "); //$NON-NLS-1$			int t= arg.indexOf(" ", c+1); //$NON-NLS-1$			String className= arg.substring(0, c);			String testName= arg.substring(c+1, t);			String status= arg.substring(t+1);			int statusCode= ITestRunListener.STATUS_OK;			if (status.equals("FAILURE")) //$NON-NLS-1$				statusCode= ITestRunListener.STATUS_FAILURE;			else if (status.equals("ERROR")) //$NON-NLS-1$				statusCode= ITestRunListener.STATUS_ERROR;							String trace= ""; //$NON-NLS-1$			if (statusCode != ITestRunListener.STATUS_OK)				trace= fFailedRerunTrace; // assumption a rerun trace was sent before			fListener.testReran(className, testName, statusCode, trace);		}	}