Grails
  1. Grails
  2. GRAILS-7514

testdata from unit test is available in integration test.

    Details

    • Testcase included:
      yes

      Description

      The attached grails project is pretty straightforward, and will show the bug as-well as a "workaround".

      Summarized:
      If you have a Superclass and a Subclass, and when mocking data by Superclass (which is necessary in some situations) and having Subclass as instances. Then you will pollute all following tests with testdata from previous tests. So basically a testdata leakage.

      Background information:
      http://stackoverflow.com/questions/6069579/grails-test-app-fails-on-ci-server-but-not-on-developer-machine
      http://stackoverflow.com/questions/6080568/grails-mocked-data-from-a-unit-test-is-available-in-an-integration-test

        Activity

        Hide
        David Betts added a comment -

        I get the same test failure in your sample app on Grails 1.3.7 Java 1.6.0_25.

        Show
        David Betts added a comment - I get the same test failure in your sample app on Grails 1.3.7 Java 1.6.0_25.
        Hide
        Graeme Rocher added a comment -

        attached example works fine in 2.0

        Show
        Graeme Rocher added a comment - attached example works fine in 2.0

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Kim Eik
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development