Permalink
Browse files

Moved tests into suites to avoid circular dependency between modules …

…issue
  • Loading branch information...
1 parent bd8b478 commit ccc326adf22442cb9796583aff0eafeb69f52f37 @graemerocher graemerocher committed Feb 23, 2011
Showing 623 changed files with 49 additions and 124 deletions.
View
@@ -18,10 +18,6 @@ targetCompatibility = "1.5"
archivesBaseName = 'grails'
-repositories {
- mavenCentral()
- mavenRepo urls:"http://maven.springframework.org/release"
-}
configurations {
grailsScripts
@@ -54,6 +50,7 @@ subprojects { project ->
repositories {
+ mavenCentral()
mavenRepo urls:"http://maven.springframework.org/release"
}
dependencies {
@@ -1,6 +1,3 @@
-repositories {
- mavenCentral()
-}
dependencies {
groovy group: 'org.codehaus.groovy', name: 'groovy-all', version: '1.8.0-beta-4'
}
@@ -34,6 +34,7 @@
import org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager;
import org.codehaus.groovy.grails.plugins.GrailsPluginManager;
import org.codehaus.groovy.grails.plugins.PluginManagerHolder;
+import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.xml.XmlBeanFactory;
@@ -93,15 +94,12 @@ public GrailsRuntimeConfigurator(GrailsApplication application, ApplicationConte
parent.containsBean(DATA_SOURCE_BEAN);
}
- pluginManager = PluginManagerHolder.getPluginManager();
- if (pluginManager == null) {
+ try {
+ pluginManager = parent.getBean(GrailsPluginManager.class);
+ } catch (BeansException e) {
pluginManager = new DefaultGrailsPluginManager("**/plugins/*/**GrailsPlugin.groovy", application);
PluginManagerHolder.setPluginManager(pluginManager);
}
- else {
- LOG.debug("Retrieved thread-bound PluginManager instance");
- pluginManager.setApplication(application);
- }
}
/**
View
@@ -1,5 +1,4 @@
repositories {
- mavenCentral()
mavenRepo urls:"http://download.java.net/maven/2"
}
@@ -11,22 +11,7 @@ dependencies {
'javassist:javassist:3.11.0.GA',
'antlr:antlr:2.7.6'
- testCompile project(':grails-test-suite-base'),
- project(':grails-test'),
- project(':grails-plugin-url-mappings'),
- project(':grails-plugin-controllers'),
- project(':grails-plugin-logging'),
- project(':grails-plugin-mimetypes'),
- project(':grails-plugin-gsp'),
- project(':grails-plugin-filters'),
- project(':grails-plugin-codecs'),
- project(':grails-plugin-converters'),
- project(':grails-plugin-i18n'),
- project(':grails-plugin-servlets'),
- project(':grails-plugin-validation'),
- project(':grails-plugin-datasource'),
- project(':grails-plugin-services'),
- project(':grails-plugin-testing')
+
}
test {
// maxParallelForks = 4
@@ -1,15 +1,4 @@
dependencies {
compile project(":grails-web")
-
- testCompile project(":grails-test"), project(":grails-test-suite-base"), project(":grails-plugin-testing")
-
- testCompile project(':grails-plugin-logging'),
- project(':grails-plugin-mimetypes'),
- project(':grails-plugin-url-mappings'),
- project(':grails-plugin-filters'),
- project(':grails-plugin-gsp'),
- project(':grails-plugin-converters'),
- project(':grails-plugin-i18n'),
- project(':grails-plugin-servlets')
}
jar.appendix = 'plugin-codecs'
@@ -1,16 +1,5 @@
dependencies {
compile project(":grails-web")
-
- testCompile project(":grails-test"), project(":grails-test-suite-base"), project(":grails-plugin-testing")
-
- testCompile project(':grails-plugin-logging'),
- project(':grails-plugin-mimetypes'),
- project(':grails-plugin-url-mappings'),
- project(':grails-plugin-filters'),
- project(':grails-plugin-gsp'),
- project(':grails-plugin-codecs'),
- project(':grails-plugin-i18n'),
- project(':grails-plugin-servlets')
}
jar.appendix = 'plugin-converters'
@@ -1,14 +1,4 @@
dependencies {
compile project(":grails-web"), project(":grails-plugin-controllers")
- testCompile project(":grails-test"), project(":grails-test-suite-base"), project(":grails-plugin-testing")
-
- testCompile project(':grails-plugin-logging'),
- project(':grails-plugin-mimetypes'),
- project(':grails-plugin-url-mappings'),
- project(':grails-plugin-converters'),
- project(':grails-plugin-gsp'),
- project(':grails-plugin-codecs'),
- project(':grails-plugin-i18n'),
- project(':grails-plugin-servlets')
}
jar.appendix = 'plugin-filters'
@@ -1,16 +1,5 @@
dependencies {
compile project(":grails-web"), project(":grails-plugin-codecs"), project(":grails-plugin-controllers")
-
- testCompile project(":grails-test"), project(":grails-test-suite-base"), project(":grails-plugin-testing")
-
- testCompile project(':grails-plugin-logging'),
- project(':grails-plugin-mimetypes'),
- project(':grails-plugin-url-mappings'),
- project(':grails-plugin-filters'),
- project(':grails-plugin-codecs'),
- project(':grails-plugin-converters'),
- project(':grails-plugin-i18n'),
- project(':grails-plugin-servlets')
}
test {
maxParallelForks = 4
@@ -1,15 +1,4 @@
dependencies {
compile project(":grails-web")
-
- testCompile project(":grails-test"), project(":grails-test-suite-base"), project(":grails-plugin-testing")
-
- testCompile project(':grails-plugin-logging'),
- project(':grails-plugin-converters'),
- project(':grails-plugin-url-mappings'),
- project(':grails-plugin-filters'),
- project(':grails-plugin-gsp'),
- project(':grails-plugin-codecs'),
- project(':grails-plugin-i18n'),
- project(':grails-plugin-servlets')
}
jar.appendix = 'plugin-mimetypes'
@@ -1,21 +1,4 @@
dependencies {
compile project(":grails-crud")
-
- testCompile project(":grails-test"), project(":grails-test-suite-base"), project(":grails-plugin-testing")
-
- testCompile project(':grails-plugin-url-mappings'),
- project(':grails-plugin-controllers'),
- project(':grails-plugin-logging'),
- project(':grails-plugin-mimetypes'),
- project(':grails-plugin-gsp'),
- project(':grails-plugin-filters'),
- project(':grails-plugin-codecs'),
- project(':grails-plugin-converters'),
- project(':grails-plugin-i18n'),
- project(':grails-plugin-servlets'),
- project(':grails-plugin-validation'),
- project(':grails-plugin-datasource'),
- project(':grails-plugin-services'),
- project(':grails-plugin-testing')
}
jar.appendix = 'plugin-scaffolding'
@@ -1,16 +1,4 @@
dependencies {
compile project(":grails-web"), project(":grails-plugin-controllers")
-
- testCompile project(":grails-test"), project(":grails-test-suite-base"), project(":grails-plugin-testing")
-
- testCompile project(':grails-plugin-logging'),
- project(':grails-plugin-mimetypes'),
- project(':grails-plugin-gsp'),
- project(':grails-plugin-filters'),
- project(':grails-plugin-codecs'),
- project(':grails-plugin-converters'),
- project(':grails-plugin-i18n'),
- project(':grails-plugin-servlets')
-
}
jar.appendix = 'plugin-url-mappings'
@@ -59,7 +59,7 @@ abstract class AbstractGrailsPluginTests extends GroovyTestCase {
ctx.registerMockBean("manager", mockManager)
- def configurator = new GrailsRuntimeConfigurator(ga)
+ def configurator = new GrailsRuntimeConfigurator(ga, ctx)
configurator.pluginManager = mockManager
ctx.registerMockBean(GrailsRuntimeConfigurator.BEAN_ID, configurator)
@@ -0,0 +1,17 @@
+dependencies {
+
+ testCompile project(':grails-test-suite-base'),
+ project(':grails-plugin-testing'),
+ project(':grails-plugin-datasource'),
+ project(':grails-plugin-i18n'),
+ project(':grails-plugin-servlets'),
+ project(':grails-plugin-url-mappings'),
+ project(':grails-plugin-services'),
+ project(':grails-hibernate')
+}
+test {
+// maxParallelForks = 4
+ forkEvery = 100
+ maxHeapSize = '1024m'
+}
+
@@ -4,7 +4,9 @@ dependencies {
project(':grails-test-suite-base'),
project(':grails-plugin-testing')
- testCompile project(':grails-plugin-url-mappings') ,
+
+ testCompile project(':grails-plugin-codecs') ,
+ project(':grails-plugin-url-mappings') ,
project(':grails-plugin-validation'),
project(":grails-plugin-datasource"),
project(":grails-plugin-servlets"),
@@ -35,7 +35,7 @@ public MultipleClassesPerFileTests(String name) {
public void testMultipleClassesPerFile() throws Exception {
GroovyClassLoader cl = new GroovyClassLoader();
- cl.parseClass(new File("src/test/org/codehaus/groovy/grails/commons/classes.groovy"));
+ cl.parseClass(getClass().getClassLoader().getResourceAsStream("org/codehaus/groovy/grails/commons/classes.groovy"));
Class<?> testClass1 = cl.loadClass("TestClass1");
Class<?> testClass2 = cl.loadClass("TestClass2");
Oops, something went wrong.

0 comments on commit ccc326a

Please sign in to comment.