jdk/test/com/sun/servicetag/SystemRegistryTest.java
changeset 5815 8c68030e27b1
parent 5813 8e455cd3e807
child 7668 d4a77089c587
--- 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);