Revision: 19627
          http://sourceforge.net/p/gate/code/19627
Author:   markagreenwood
Date:     2016-10-04 13:14:17 +0000 (Tue, 04 Oct 2016)
Log Message:
-----------
make sure the builtin resources are re-registered if a test needs to clear the 
register for some reason -- feels like the test is dodgy to me

Modified Paths:
--------------
    gate/branches/sawdust2/gate-core/src/test/java/gate/config/TestConfig.java
    
gate/branches/sawdust2/gate-core/src/test/java/gate/creole/DynamicRegistrationTest.java
    gate/branches/sawdust2/gate-core/src/test/java/gate/creole/TestCreole.java

Modified: 
gate/branches/sawdust2/gate-core/src/test/java/gate/config/TestConfig.java
===================================================================
--- gate/branches/sawdust2/gate-core/src/test/java/gate/config/TestConfig.java  
2016-10-04 11:20:24 UTC (rev 19626)
+++ gate/branches/sawdust2/gate-core/src/test/java/gate/config/TestConfig.java  
2016-10-04 13:14:17 UTC (rev 19627)
@@ -59,6 +59,7 @@
   public void tearDown() throws Exception {
     CreoleRegister register = Gate.getCreoleRegister();
     register.clear();
+    Gate.initCreoleRegister();
   } // tearDown
 
   /**

Modified: 
gate/branches/sawdust2/gate-core/src/test/java/gate/creole/DynamicRegistrationTest.java
===================================================================
--- 
gate/branches/sawdust2/gate-core/src/test/java/gate/creole/DynamicRegistrationTest.java
     2016-10-04 11:20:24 UTC (rev 19626)
+++ 
gate/branches/sawdust2/gate-core/src/test/java/gate/creole/DynamicRegistrationTest.java
     2016-10-04 13:14:17 UTC (rev 19627)
@@ -37,8 +37,15 @@
 
     }
   }
+  
+  @Override
+  public void setUp() throws Exception {
+    if (!Gate.isInitialised()) {
+      Gate.runInSandbox(true);
+      Gate.init();
+    }
+  }
 
-
   public void testDynamicRegistration() throws Exception {
     Gate.getCreoleRegister().registerPlugin(new 
Plugin.Component(TestResource.class));
 

Modified: 
gate/branches/sawdust2/gate-core/src/test/java/gate/creole/TestCreole.java
===================================================================
--- gate/branches/sawdust2/gate-core/src/test/java/gate/creole/TestCreole.java  
2016-10-04 11:20:24 UTC (rev 19626)
+++ gate/branches/sawdust2/gate-core/src/test/java/gate/creole/TestCreole.java  
2016-10-04 13:14:17 UTC (rev 19627)
@@ -81,7 +81,7 @@
   @Override
   public void tearDown() throws Exception {
     reg.clear();
-    Gate.init();
+    Gate.initCreoleRegister();
   } // tearDown
 
   /** Test the getInstances methods on CreoleRegister */

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GATE-cvs mailing list
GATE-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to