--- a/jdk/test/com/sun/servicetag/SystemRegistryTest.java Sun Jun 20 19:56:42 2010 -0700
+++ b/jdk/test/com/sun/servicetag/SystemRegistryTest.java Mon Jun 21 15:02:47 2010 -0700
@@ -31,7 +31,7 @@
* @author Mandy Chung
*
* @run build SvcTagClient SystemRegistryTest Util
- * @run main/othervm SystemRegistryTest
+ * @run main SystemRegistryTest
*/
import com.sun.servicetag.*;
@@ -50,8 +50,16 @@
private static Registry registry;
public static void main(String[] argv) throws Exception {
- registry = Util.getSvcTagClientRegistry();
+ try {
+ registry = Util.getSvcTagClientRegistry();
+ runTest();
+ } finally {
+ // restore empty registry file
+ Util.emptyRegistryFile();
+ }
+ }
+ private static void runTest() throws Exception {
for (String filename : files) {
File f = new File(servicetagDir, filename);
ServiceTag svcTag = Util.newServiceTag(f);