1. jummp
  2. jummp


Raza Ali  committed 09bd777

Protecting lucene indexes during testing

UpdatedRepListener sets the index location based on the
environment variable. Also, multi-process tests disabled
until a more thought out design decision can be made.

  • Participants
  • Parent commits 68388d5
  • Branches master

Comments (0)

Files changed (2)

File src/groovy/net/biomodels/jummp/search/UpdatedRepositoryListener.groovy

View file
 import org.apache.lucene.search.SearcherFactory
 import org.apache.lucene.search.IndexSearcher
 import org.codehaus.groovy.grails.commons.ApplicationHolder
+import grails.util.Environment
  * @short Listener for new revisions and models for indexing
 	def grailsApplication = ApplicationHolder.application
 	public UpdatedRepositoryListener() {
-		File location=new File(grailsApplication.config.jummp.search.index)
+		String path=grailsApplication.config.jummp.search.index
+		if (Environment.current == Environment.TEST) {
+			path = "target/search/index"
+		}
+		File location=new File(path)
 		System.out.println("USING ${location} for directory!")
 		//Create instance of Directory where index files will be stored

File test/integration/net/biomodels/jummp/core/MultiProcessRepositoryTests.groovy

View file
        FileUtils.deleteDirectory(new File("target/vcs/modelfolder"))
-    @Test
+    @Ignore @Test
     void testConcurrent() {
     	//start up sync server
         InterJummpSync sync=new InterJummpSync()