#577 Unit testing hangs if package is wrong (JUnit)

6: Crashes
closed-works-for-me
nobody
7
2007-03-16
2007-02-28
No

If a file in a DrJava project has a package designation that does not match its actual directory location, DrJava will compile the project with no error, but will hang (forever hourglass) when "Test Project" is clicked.
This is a holdover from the pre-project days of DrJava when it could open and compile individual files that were on separate directory trees. DrJava still tries to resolve the package directories separately for each file and thus will compile, without error, a situation where a file is in an incorrect physical directory for its specified package. However, the JUnit subsystem will not tolerate this and will hang.

Resolution suggestion: remove DrJava's latent ability to compile individual files on different physical source trees. From a pedagogical standpoint, this feature is completely unnecessary and since mislabeling the package name is a common mistake by beginning students, all this feature does is cause problems because DrJava does not currently catch this error.

Discussion

  • Stephen Wong

    Stephen Wong - 2007-02-28
    • summary: Unit testing hands if package is wrong --> Unit testing hangs if package is wrong
     
  • Christopher Warrington

    Logged In: YES
    user_id=666678
    Originator: NO

    I cannot reporduce this with the attached project in r4190. Can you upload a project that causes this hang?
    File Added: junit_hang.tgz

     
  • Christopher Warrington

    Sample project to cause JUnit testing hang. Does not cause hang in r4190.

     
  • Christopher Warrington

    • summary: Unit testing hangs if package is wrong --> Unit testing hangs if package is wrong (JUnit)
     
  • Stephen Wong

    Stephen Wong - 2007-03-01

    Project that causes hang (see ToString.java)

     
  • Stephen Wong

    Stephen Wong - 2007-03-01

    Logged In: YES
    user_id=540207
    Originator: YES

    File Added: HW06.zip

     
  • Christopher Warrington

    • status: open --> pending-works-for-me
     
  • Christopher Warrington

    Logged In: YES
    user_id=666678
    Originator: NO

    Using the provided project file, I cannot reproduce this with DrJava r4190 on Windows. If, after downloading r4190 from http://www.owlnet.rice.edu/~chrisw/drjava/drjava-r4190.jar , you can still reproduce this error, post a follow up. Otherwise, this ticket will close itself in a few days.

     
  • SourceForge Robot

    • status: pending-works-for-me --> closed-works-for-me
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.