[MOBY-guts] biomoby commit
Eddie Kawas
kawas at dev.open-bio.org
Thu Oct 12 01:55:20 UTC 2006
kawas
Wed Oct 11 21:55:20 EDT 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities
In directory dev.open-bio.org:/tmp/cvs-serv29605/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities
Modified Files:
ServiceTester.java
Log Message:
services with urls that were 'localhost' caused the tester to perform inadequately ;-)
moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities ServiceTester.java,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java 2006/10/11 01:54:50 1.4
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/utilities/ServiceTester.java 2006/10/12 01:55:20 1.5
@@ -94,16 +94,21 @@
// avoid indexing errors (we checked the length before entering loop)
if (i >= services.length)
break;
- MobyService service = services[i];
+ MobyService service = services[i++];
String authority = service.getAuthority();
String name = service.getName();
if (service.getURL().toLowerCase().startsWith("http://localhost")
|| service.getURL().toLowerCase().startsWith("http://127.0.0.1")) {
- continue;
+ Map list = null;
+ if (theMap.containsKey(authority))
+ list = (Map) theMap.get(authority);
+ else
+ list = Collections.synchronizedMap(new HashMap());
+ list.put(name, new Boolean(false));
+ theMap.put(authority, list);
}
testers[j] = new TesterThread(service);
testers[j].start();
- i++;
}
} else {
// should in theory have no more services to test ...
@@ -314,4 +319,10 @@
public void setNumThreads(int numThreads) {
this.numThreads = numThreads;
}
+ public static void main(String[] args) throws MobyException {
+ ServiceTester s = new ServiceTester("http://localhost/cgi-bin/MOBY-Central.pl","http://localhost/MOBY/Central");
+ s.testServices(s.getServices());
+ System.out.println(s.getResults());
+
+ }
}
More information about the MOBY-guts
mailing list