Bug 11222 RCL_2_4
authordadubrow
Fri, 25 Jun 2010 15:35:36 -0500
branchRCL_2_4
changeset 1548 972cc303236d
parent 1343 2e6feade22d3
child 1549 84e4ca0e2d58
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 May 07 15:05:05 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections.tests/src/com/nokia/carbide/remoteconnections/tests/discovery/RandomDiscoveryAgent.java	Fri Jun 25 15:35:36 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();
+	}
+
 }