Commit Graph

6113 Commits

Author SHA1 Message Date
Chris Beams b836e14b5f Merge branch 'cleanup-test-duplicates' into cleanup-3.2.x
* cleanup-test-duplicates:
  Update Apache license headers for affected sources
  Remove duplicate test classes
  Replace test beans with test objects

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java
	spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java
2013-01-04 10:31:31 +01:00
Chris Beams d1e6dbe74a Update Apache license headers for affected sources 2013-01-04 10:29:11 +01:00
Phillip Webb 42b5d6dd7e Remove duplicate test classes
Prior to this commit many test utility classes and sample beans were
duplicated across projects. This was previously necessary due to the
fact that dependent test sources were not shared during a gradle
build. Since the introduction of the 'test-source-set-dependencies'
gradle plugin this is no longer the case.

This commit attempts to remove as much duplicate code as possible,
co-locating test utilities and beans in the most suitable project.
For example, test beans are now located in the 'spring-beans'
project.

Some of the duplicated code had started to drift apart when
modifications made in one project where not ported to others. All
changes have now been consolidated and when necessary existing tests
have been refactored to account for the differences.

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java
	spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java
	spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java
2013-01-04 10:02:29 +01:00
Phillip Webb 2a30fa07ea Replace test beans with test objects
Refactor spring-core tests to replace test beans from
'org.springframework.beans' with lighter test objects in
'org.springframework.tests.sample.objects'.
2013-01-04 10:02:29 +01:00
Chris Beams bd1db73a17 Merge branch 'share-test-classes' into cleanup-3.2.x
* share-test-classes:
  Polish test sourceSet dependencies
  Add test dependencies sources for testCompile
2013-01-04 09:55:19 +01:00
Phillip Webb 16a3a8bda8 Polish test sourceSet dependencies
Remove all direct sourceSets.test.output dependencies and instead rely
on the 'test-source-set-dependencies' plugin.

This commit also updates the api JavaDoc task to ensure that
dependencies are not resolved too early.
2013-01-04 09:39:27 +01:00
Phillip Webb d52f883453 Add test dependencies sources for testCompile
Update the TestSourceSetDependenciesPlugin to consider testCompile
configurations.
2013-01-04 09:39:27 +01:00
Chris Beams 1487b70394 Merge branch 'SPR-10124' into cleanup-3.2.x
* SPR-10124:
  Use unmodified 'version' when not on a topic branch
2013-01-03 23:56:31 +01:00
Chris Beams 7d6161f280 Use unmodified 'version' when not on a topic branch 2013-01-03 23:54:52 +01:00
Chris Beams 3b5e90d242 Merge branch 'SPR-8116' into cleanup-3.2.x
* SPR-8116:
  Enable execution of TestNG tests in spring-test
2013-01-03 22:14:30 +01:00
Chris Beams ab16af5c50 Merge branch 'SPR-10124' into cleanup-3.2.x
* SPR-10124:
  Polish support for topic branch-specific versions
2013-01-03 22:09:18 +01:00
Chris Beams 8216e75a91 Merge branch 'SPR-9984' into cleanup-3.2.x
* SPR-9984:
  Segregate add'l long-running and performance tests
2013-01-03 19:37:20 +01:00
Chris Beams 3cbb136861 Enable execution of TestNG tests in spring-test
Both JUnit- and TestNG-based tests are once again executed in the
spring-test module.

Note that two lines in FailingBeforeAndAfterMethodsTests had to be
commented out. See diff or `git grep 'See SPR-8116'` for details.

Issue: SPR-8116
2013-01-03 19:34:29 +01:00
Chris Beams 44a7e77e6d Polish support for topic branch-specific versions
Issue: SPR-10124
2013-01-03 19:31:51 +01:00
Chris Beams 68e3b7773c Segregate add'l long-running and performance tests
- Add TestGroup#LONG_RUNNING to distinguish from #PERFORMANCE, the
   former being tests that simply take a long time vs the latter being
   tests that are actually dependent on certain actions happening within
   a given time window and are thefore CPU-dependent.

Issue: SPR-9984
2013-01-03 19:28:05 +01:00
Chris Beams acd86a1fd7 Merge branch 'cleanup-3.2.x' into SPR-9984 2013-01-03 19:26:24 +01:00
Chris Beams 830d73b4a7 Eliminate EBR dependencies and repository config
Swap the following EBR-specific dependencies for their equivalents at
Maven Central:

 - atinject-tck
 - jaxb
 - xmlbeans

Remove the /ebr-maven-external repository from the build script entirely
such that all dependencies are now resolved against a single repository:

    http://repo.springsource.org/libs-release
2013-01-03 19:19:25 +01:00
Chris Beams dcda78bad6 Skip creation of IDEA metadata for spring-aspects
See diff for details
2013-01-03 19:19:24 +01:00
Chris Beams a6eaf871f1 Fix Eclipse compilation error in Gradle plugin
Prior to this commit, the following compilation error presented itself
when importing buildSrc ('spring-build-src') into Eclipse:

    Groovy:missing type for constructor call @ line 36, column 49.

This commit replaces the use of the diamond operator with typical
generics syntax in order to work around the problem. It is assumed that
the underlying problem is to do with the Groovy compiler in use. This
change ensures that any contributor / committer importing
spring-framework into Eclipse has a straightforward experience without
being required to tweak Groovy settings.

If selection of the correct Groovy compilation settings can be made
automatic, then we should of course feel free to use Java 7-style syntax
there in the future.

Note that this was *not* a problem when importing buildSrc into IDEA 12.
2013-01-03 19:19:24 +01:00
Chris Beams a2d80c6094 Polish build.gradle
- Consolidate shared test systemProperty declarations
 - Consolidate easymock dependency declarations
2013-01-03 19:08:48 +01:00
Chris Beams 1c31f6af8e Merge branch '3.2.x' into cleanup-3.2.x 2013-01-03 19:07:02 +01:00
Phillip Webb 0b2c305072 Recursively add test dependencies
Update TestSourceSetDependenciesPlugin to recursively search project
dependencies when adding test source sets.
2013-01-02 11:51:10 -08:00
Phillip Webb c892b81852 Exclude spring-build-src from maven publish 2013-01-01 20:42:36 -08:00
Phillip Webb 65fb26f847 Move spring-build-junit into spring-core
Move code from spring-build-junit into spring-core/src/test along with
several other test utility classes. This commit removes the temporary
spring-build-junit project introduced in commit
b083bbdec7.
2013-01-01 19:49:45 -08:00
Phillip Webb db2b00a2a5 Relocate MergePlugin package
Relocate the MergePlugin from org.springframework.build.gradle.merge
to org.springframework.build.gradle.
2013-01-01 17:38:06 -08:00
Phillip Webb 290aa5d647 Develop a gradle plugin to add test dependencies
Develop a gradle plugin to automatically update testCompile dependencies
to include the test source sets of project dependencies.

Allows the gradle build to more closely mirror the way that tests run
inside eclipse.
2013-01-01 17:30:28 -08:00
Phillip Webb 57d68b070e Expose Gradle buildSrc for IDE support
Create 'spring-build-src' Gradle module that exposes the buildSrc
folder as an IDE project.
2013-01-01 14:53:42 -08:00
Phillip Webb 6626a38730 Fix [deprecation] compiler warnings
Fix deprecation compiler warnings by refactoring code or applying
@SuppressWarnings("deprecation") annotations. JUnit tests of
internally deprecated classes are now themselves marked as
@Deprecated.

Numerous EasyMock deprecation warnings will remain until the
migration to mockito can be completed.
2013-01-01 13:42:15 -08:00
Phillip Webb 9364043a64 Upgrade to xmlunit version 1.3 2013-01-01 13:26:49 -08:00
Phillip Webb 938c24bb9e Improve 'build' folder ignores
Update .gitignore to only ignore 'build' folders in the project roots
rather than throughout the source tree.
2013-01-01 13:24:05 -08:00
Chris Beams 38f84fa03e Merge branch 'SPR-10115' into 3.2.x
* SPR-10115:
  Fix regression in static setter method support
2012-12-31 14:50:38 +01:00
Chris Beams 7a19fd5750 Fix regression in static setter method support
The intention of ExtendedBeanInfo, introduced with SPR-8079 in
v3.1.0.M2, was to support dependency injection against non-void
returning write methods. However, it also inadvertently introduced
support for injection against static setter methods.

When use of ExtendedBeanInfo was made optional with SPR-9723 in
v3.2.0.M2, ExtendedBeanInfo continued to support static write methods,
but its new BeanInfoFactory-based approach to testing whether or not
a given bean class contains candidate write methods was written in a
fashion exclusive of static methods, and this thereby introduced a
regression - a regression in an otherwise undocumented and unintended
feature, but a regression nevertheless.

The reporting of SPR-10115 proves that at least one user has come to
depend on this behavior allowing injection against static write
methods, and so this commit fixes the regression by ensuring that the
candidacy test includes standard and non-void setter methods having a
static modifier.

Issue: SPR-10115, SPR-9723, SPR-8079
2012-12-31 14:16:38 +01:00
Chris Beams 0ed9cb2302 Merge pull request #206 from daveboden/SPR-10122
* SPR-10122:
  Fix SpEL JavaBean compliance for setters
2012-12-31 11:52:18 +01:00
Chris Beams d91a419fdc Fix SpEL JavaBean compliance for setters
Prior to this change, SpEL was capable of handling getter methods for
property names having a lowercase first letter and uppercase second
letter such as:

    public String getiD() { ... }

However, setters with the same naming arrangement were not supported,
e.g.:

    public void setiD() { ... }

This commit ensures that setters and getters are treated by SpEL equally
in this regard, such that "iD"-style property names may be used anywhere
within SpEL expressions.

Issue: SPR-10122, SPR-9123
2012-12-31 11:40:53 +01:00
Chris Beams 55a05744f7 Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Add aop target source test to TestGroup.PERFORMANCE
2012-12-29 01:05:46 +01:00
Chris Beams 90d1886cbd Add aop target source test to TestGroup.PERFORMANCE
Issue: SPR-9984
2012-12-29 01:04:57 +01:00
Chris Beams 1220611f4a Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Add quartz scheduling test to TestGroup.PERFORMANCE
2012-12-29 00:24:20 +01:00
Chris Beams c005757775 Add quartz scheduling test to TestGroup.PERFORMANCE
Issue: SPR-9984
2012-12-29 00:23:52 +01:00
Chris Beams b83e2617ce Merge pull request #208 from tommack/typo-fix
# By Tom Mack
* typo-fix:
  Remove extra URL prefix in the MVC chapter
2012-12-28 23:18:59 +01:00
Tom Mack 005ee7385f Remove extra URL prefix in the MVC chapter
A link in the MVC chapter of the reference manual contained an extra
"http://" URL prefix.

This commit removes the extra "http://" URL prefix.
2012-12-28 23:18:18 +01:00
Sam Brannen 11d975bfef Polish contributor guidelines 2012-12-28 23:17:52 +01:00
Chris Beams 7736dc3122 Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x: (21 commits)
  Update Apache license headers for affected sources
  Ignore performance-sensitive tests by default
  Introduce 'spring-build-junit' subproject
  Replace EasyMock with Mockito in test sources
  Add @Override annotations to test sources
  Update test source and target JDK compatibility
  Update -Xlint compiler warning output
  Fix various compiler warnings in spring-context
  Fix "unnecessary @SuppressWarnings" warnings
  Fix [rawtypes] compiler warnings
  Fix [dep-ann] warnings with @Deprecated
  Fix [cast] compiler warnings
  Fix [serial] compiler warnings
  Fix [varargs] compiler warnings
  Fix warnings due to unused import statements
  Replace <code> with {@code} throughout Javadoc
  Fix various Javadoc warnings
  Replace space indentation with tabs
  Remove trailing whitespace in source files
  Various updates to support IDEA
  ...
2012-12-28 23:16:54 +01:00
Chris Beams 8472a2b2ab Update Apache license headers for affected sources 2012-12-28 23:09:31 +01:00
Chris Beams e7155616a5 Merge branch 'SPR-9984' into cleanup-3.2.x
* SPR-9984:
  Ignore performance-sensitive tests by default
  Introduce 'spring-build-junit' subproject
2012-12-28 23:08:56 +01:00
Phillip Webb 60032e0012 Ignore performance-sensitive tests by default
Make use of the new JUnit functionality introduced in the previous
commit to 'Assume' that perfomance- and timing-sensitive tests should
run only when TestGroup.PERFORMANCE is selected, i.e. when
-PtestGroups="performance" has been provided at the Gradle command line.

The net effect is that these tests are now ignored by default, which
will result in far fewer false-negative CI build failures due to
resource contention and other external factors that cause slowdowns.

We will set up a dedicated performance CI build to run these tests on
an isolated machine, etc.

Issue: SPR-9984
2012-12-28 23:08:37 +01:00
Phillip Webb b083bbdec7 Introduce 'spring-build-junit' subproject
Introduce new 'spring-build-junit' subproject containing shared
JUnit utilities and classes to be used by other test cases. This
project is for internal use within the framework, and therefore
creates no artifacts to be published to any repository.

The initial code includes support for JUnit Assumptions that can
be used to determine when a test should run. Tests can be skipped
based on the running JDK version, logging level or based on specific
'groups' that have activated via a Gradle property.

It is intended that sources within the spring-build-junit project be
folded into spring-core/src/test/java, pending some Gradle work that
will facilitate sharing test output across subprojects; therefore this
commit should be seen as a temporary solution.

Issue: SPR-9984
2012-12-28 23:08:37 +01:00
Chris Beams 330457be95 Merge branch 'SPR-10126' into cleanup-3.2.x
* SPR-10126:
  Replace EasyMock with Mockito in test sources
2012-12-28 23:07:27 +01:00
Phillip Webb d66c733ef4 Replace EasyMock with Mockito in test sources
Issue: SPR-10126
2012-12-28 23:07:04 +01:00
Chris Beams cbf6991d47 Merge branch 'SPR-10129' into cleanup-3.2.x
* SPR-10129:
  Add @Override annotations to test sources
  Update test source and target JDK compatibility
2012-12-28 23:06:22 +01:00
Chris Beams 4c8cd7b0bd Add @Override annotations to test sources
Issue: SPR-10129
2012-12-28 23:05:44 +01:00