Grails

ClassNotFoundException from Integration Test

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Not A Bug
  • Affects Version/s: 1.2-RC1
  • Fix Version/s: 1.2 final
  • Component/s: Testing
  • Labels:
    None
  • Environment:
    Grails 1.2.RC1
    Windows 7

Description

Running "grails test-app integration" yields ClassNotFoundException for ClassName when ClassName is in a "com.example" package.

"grails test-app integration: com.example.ClassName" runs the test appropriately.

All domains, controllers, and tests are in the same package.

Activity

Hide
Graeme Rocher added a comment -

i thought it was "grails test-app --integration", but Luke can you investigate?

Show
Graeme Rocher added a comment - i thought it was "grails test-app --integration", but Luke can you investigate?
Hide
Alex Weino added a comment -

It is probably important that I add the class I am testing is a controller and Tests class extends ControllerUnitTestCase.

Show
Alex Weino added a comment - It is probably important that I add the class I am testing is a controller and Tests class extends ControllerUnitTestCase.
Hide
Graeme Rocher added a comment -

I personally can't reproduce this, maybe its worth attaching an example

Show
Graeme Rocher added a comment - I personally can't reproduce this, maybe its worth attaching an example
Hide
Luke Daley added a comment -

Alex, can you please test against RC2 and let me know.

Show
Luke Daley added a comment - Alex, can you please test against RC2 and let me know.
Hide
Alex Weino added a comment -

An example showing when this fails.

Show
Alex Weino added a comment - An example showing when this fails.
Hide
Alex Weino added a comment -

I figured out what was going on. I had all my tests in "test/integration", rather than "test/integration/com/example" when it is in the package "com.example". I don't know enough about packages to say if this is proper behavior or not.

Show
Alex Weino added a comment - I figured out what was going on. I had all my tests in "test/integration", rather than "test/integration/com/example" when it is in the package "com.example". I don't know enough about packages to say if this is proper behavior or not.
Hide
Graeme Rocher added a comment -

thx closing

Show
Graeme Rocher added a comment - thx closing
Hide
Luke Daley added a comment -

Graeme, I see what's going on here. We could provide a better error message.

I am inclined to reopen and schedule for 1.2.1. Agree?

Show
Luke Daley added a comment - Graeme, I see what's going on here. We could provide a better error message. I am inclined to reopen and schedule for 1.2.1. Agree?

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: