Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging breakpoints on JUnit test in Eclipse are not working

I am trying to debug a junit test in eclipse but my breakpoints are not firing (unless they are on the first or second line).

I've tried deleting and recreating all breakpoints in the workspace, cleaning the project, creating a new debug configuration, and running the test method individually and as part of a test class with other methods. But all to no avail :-(

 public void testLoadPatientsAndConvertToBeans() throws IOException, CDataGridException {
  File file = fileutil.getFileFromPrefsOrPrompt(basefileDef);

  CDataBuilder builder = new CDataDelimitedFileBuilder(file, 
    CDataDelimitedFileBuilder.DelimiterSettings.WINDOWS_CSV,
    basefileDef);

  // breakpoints placed on lines from here on do not fire

  CDataCacheContainer container = 
   cacheIO.construct(
     new CDataNarrower(
       cacheIO.construct(builder)
     ).setConvertMissing(true));

  assertEquals(13548, container.size());

  cacheIO.export(container, patients);

  Collection<Patient> pBeans = patients.getBeans();

  assertEquals(container.size(), pBeans.size());

  Patient patient = pBeans.iterator().next();
  Map props = patient.getPropertyMap();

  System.out.println(props);
 }
like image 900
tekumara Avatar asked Oct 02 '09 00:10

tekumara


1 Answers

This is likely if you are using Sun JDK 6 Update 14. See another similar SO question here. The likely resolution in such a case is to use Sun JDK 6 Update 16.

like image 170
Vineet Reynolds Avatar answered Sep 30 '22 15:09

Vineet Reynolds