Grails
  1. Grails
  2. GRAILS-2811

Grails interactive test-app remembers paramters passed to it

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.3
    • Fix Version/s: 1.2-M4
    • Component/s: None
    • Labels:
      None
    • Patch Submitted:
      Yes

      Description

      When using grails interactive:

      grails interactive
      test-app

      (you'll notice that two tests run - one for Book and one for Author)

      test-app Book

      (you'll notice that only one test runs, this is as expected)

      test-app

      (notice that only one test was run - I expected that since I didn't pass the name of a test to the test-app command, it would have run the whole suite again, but it only ran Book.)

        Issue Links

          Activity

          Hide
          Rob Nielsen added a comment -

          Here's a patch for this issue (based off trunk revision 7434). Changes were all to
          src/commons/org/codehaus/groovy/grails/cli/GrailsScriptRunner.groovy

          The problem was that system properties were being set for
          the scripts and being left around for subsequent scripts. I changed it to
          take a copy of the system properties and restore it after each step.
          I also added an 'exit' command to get out of interactive mode.

          There was 0% coverage of GrailsScriptRunner so I added a
          test/groovy/org/codehaus/groovy/grails/cli/InteractiveTests.groovy
          file that tests basic interactive mode functionality.

          This patch also resolves GRAILS-2800, GRAILS-2840, GRAILS-3204

          Show
          Rob Nielsen added a comment - Here's a patch for this issue (based off trunk revision 7434). Changes were all to src/commons/org/codehaus/groovy/grails/cli/GrailsScriptRunner.groovy The problem was that system properties were being set for the scripts and being left around for subsequent scripts. I changed it to take a copy of the system properties and restore it after each step. I also added an 'exit' command to get out of interactive mode. There was 0% coverage of GrailsScriptRunner so I added a test/groovy/org/codehaus/groovy/grails/cli/InteractiveTests.groovy file that tests basic interactive mode functionality. This patch also resolves GRAILS-2800 , GRAILS-2840 , GRAILS-3204
          Hide
          Peter Ledbrook added a comment -
          Show
          Peter Ledbrook added a comment - Fixed
          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

            • Assignee:
              Peter Ledbrook
              Reporter:
              Mike Hugo
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development