--- 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();
+ }
+
}