Grails

The patch for GRAILS-2546 breaks running individual unit/integration tests in 1.0.2-SNAPSHOT (patch with fix included)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.0.2
  • Component/s: None
  • Labels:
    None
  • Environment:
    svn revision 6798 of grails trunk
  • Patch Submitted:
    Yes

Description

The patch for GRAILS-2546 breaks running individual unit/integration tests in the current snapshot of grails trunk (svn rev 6798).

That patch adds the ability for tests to have a different suffix other than "Tests", but it is checking for a config value

if (config.grails.testing.nameSuffix != null) {

The ConfigSlurper object will always say this is true as it returns an empty map ([:]) even for values that don't exist. This means that this breaks the default test-app where we don't specify a nameSuffix as it ends up appending the string "[:]" to the end of the class name it looks for (ex: "grails test-app BookController" looks for a test named "BookController[:]" instead of the default "BookControllerTests".

Switching it to this:

if (config.grails.testing.nameSuffix) {

Fixes the issue as an empty map evaluates to false in groovy.

Activity

Hide
Graeme Rocher added a comment -

Bulk closing bunch of resolved issues

Show
Graeme Rocher added a comment - Bulk closing bunch of resolved issues

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: