Grails
  1. Grails
  2. GRAILS-8111

Integration test error using STS ver 2.8.0.M2 and grails 2.0.0.M2

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-M2
    • Fix Version/s: 2.0-RC1
    • Component/s: Testing
    • Environment:

      Description

      Error occurs when running integration test of any kind. There is absolutely no logic in the test, just all commented out code. When the test case is ran with @TestFor annotation, it fails, but the test will pass with that annotation removed. The object being tested for in the annotation is a controller.

      I saw this exact issue reported regarding grails 2.0-M1 here (http://jira.grails.org/browse/GRAILS-7954?page=com.xiplink.jira.git.jira-git-plugin%3Agit-commits-tabpanel), and I'm seeing it now with grails 2.0.0.M2. The exact error report is the following:

      Running 1 integration test... 1 of 1

      Failure: testReportWithJSON(edu.vanderbilt.vicc.mcg.StarPanelControllerTests)
      org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.codehaus.groovy.grails.context.support.PluginAwareResourceBundleMessageSource' to required type 'org.springframework.context.support.StaticMessageSource' for property 'messageSource'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.codehaus.groovy.grails.context.support.PluginAwareResourceBundleMessageSource] to required type [org.springframework.context.support.StaticMessageSource] for property 'messageSource': no matching editors or conversion strategy found
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      at org.junit.runners.Suite.runChild(Suite.java:128)
      at org.junit.runners.Suite.runChild(Suite.java:24)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      at _GrailsTest_groovy$_run_closure4.doCall(_GrailsTest_groovy:285)
      at _GrailsTest_groovy$_run_closure2.doCall(_GrailsTest_groovy:243)
      at _GrailsTest_groovy$_run_closure1_closure21.doCall(_GrailsTest_groovy:190)
      at _GrailsTest_groovy$_run_closure1.doCall(_GrailsTest_groovy:179)
      at TestApp$_run_closure1.doCall(TestApp:82)
      Caused by: java.lang.IllegalStateException: Cannot convert value of type [org.codehaus.groovy.grails.context.support.PluginAwareResourceBundleMessageSource] to required type [org.springframework.context.support.StaticMessageSource] for property 'messageSource': no matching editors or conversion strategy found
      ... 23 more
      Completed 1 integration test, 1 failed in 397ms
      1. StarPanel.groovy
        0.3 kB
        Ross Oreto
      2. StarPanelController.groovy
        1 kB
        Ross Oreto
      3. StarPanelControllerTests.groovy
        1.0 kB
        Ross Oreto

        Activity

        Hide
        Ross Oreto added a comment -

        Additionally if this test is ran as a unit test, it passes with the @TestFor annotation present.

        Show
        Ross Oreto added a comment - Additionally if this test is ran as a unit test, it passes with the @TestFor annotation present.

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Ross Oreto
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development