Bug 11222
authordadubrow
Fri, 25 Jun 2010 15:44:56 -0500
changeset 1545 3eb6c57e65c0
parent 1544 93a010393cd9
child 1547 c01ec4eb0dbe
Bug 11222
connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/discovery/RandomDiscoveryAgent.java
--- a/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/discovery/RandomDiscoveryAgent.java	Fri Jun 25 15:35:46 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/discovery/RandomDiscoveryAgent.java	Fri Jun 25 15:44:56 2010 -0500
@@ -101,7 +101,7 @@
 		}
 	}
 
-	private DiscoveryThread thread = new DiscoveryThread();
+	private DiscoveryThread thread;
 
 	public URL getInformation() {
 		return null;
@@ -131,20 +131,33 @@
 	}
 	
 	public void start() throws CoreException {
-		if (TestFilter.isTest)
+		if (TestFilter.isTest) {
+			thread = new DiscoveryThread();
 			thread.start();
+		}
 	}
 
 	public void stop() throws CoreException {
-		thread.stopRunning();
+		if (TestFilter.isTest) {
+			thread.stopRunning();
+			thread = null;
+		}
 	}
 
 	public String getDisplayName() {
-		return "Random Test Discovery Agent";
+		return "Random Test Discovery";
 	}
 
 	public IPrerequisiteStatus getPrerequisiteStatus() {
 		return (new RandomPrerequisiteStatus());
 	}
 
+	public boolean isRunning() {
+		return thread != null;
+	}
+
+	public String getId() {
+		return getClass().getName();
+	}
+
 }