Uploaded image for project: 'Spring IDE'
  1. Spring IDE
  2. IDE-1053

JUnit cannot run the old groovy unit test now

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      What I did is just write an unit test by both groovy and java:
      A java wroted super class:
      -------------------------------------
      @RunWith(SpringJUnit4ClassRunner.class)
      @Transactional
      @TransactionConfiguration(transactionManager = "hb3TransactionManager")
      @ContextConfiguration(locations =

      { "classpath:spring/applicationContext-global.xml", "classpath:spring/applicationContext-mail.xml"}

      )
      public class AbstractErpServiceTest {
      protected final static String COUNTRY_ID = "CAN";
      @Autowired private GeoService geoService;
      ....
      ------------------------------------
      A groovy wrote subclass :
      -------------------------------
      class ActivityManagerTest extends AbstractErpServiceTest {
      @Autowired private CallManager callManager
      ...
      ---------------------------------------------
      When I use run it in my eclipse JUnit plugin, I got the exception:
      like this:
      ----------------------------------------
      2009-11-06 15:52:25,826 [main] ERROR org.springframework.test.context.TestContextManager - Caught exception while allowing TestExecutionListener [org.springframewor[email protected]153ca5] to prepare test instance [[email protected]]

      java.lang.IllegalStateException: Unable to locate bridged method for bridge method 'public void com.oppa.crm.test.service.ActivityManagerTest.this$dist$set$3(java.lang.String,java.lang.Object)'

      at org.springframework.core.BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:77) [org.springframework.core-3.0.0.RC1.jar:3.0.0.RC1]

      ---------------------------------------------------
      Actually, I works before when I use the plugin with groovy 1.6.4, but after I update to 1.6.5 or 1.7, I got these exceptions.

      Summary, groovy unit text cannot work with these together now:
      @RunWith(SpringJUnit4ClassRunner.class)
      @Transactional
      @TransactionConfiguration
      @ContextConfiguration
      Hope anyone here could help me, thanks.

        Activity

        Hide
        mlippert Martin Lippert added a comment -

        This project has moved its issue management to GitHub Issues:
        https://github.com/spring-projects/spring-ide/issues

        Therefore we closed the majority of old issues, like this one here. If you think this issue is still valid and should be fixed or worked on, please feel free to file it as a new issue on GitHub (using the link above).

        Show
        mlippert Martin Lippert added a comment - This project has moved its issue management to GitHub Issues: https://github.com/spring-projects/spring-ide/issues Therefore we closed the majority of old issues, like this one here. If you think this issue is still valid and should be fixed or worked on, please feel free to file it as a new issue on GitHub (using the link above).

          People

          • Assignee:
            Unassigned
            Reporter:
            o__jedy__o Lei Zhang
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: