Bug 582251 - Conditional breakpoint stops at wrong var content in JUnit jupiter assertAll()
Summary: Conditional breakpoint stops at wrong var content in JUnit jupiter assertAll()
Status: NEW
Alias: None
Product: Incubator
Classification: Eclipse Project
Component: e4 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: E4 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-28 07:10 EDT by fozzy bear CLA
Modified: 2023-07-28 07:10 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fozzy bear CLA 2023-07-28 07:10:23 EDT
In Eclipse 4.28.0 (also previous versions), conditional breakpoints stop at wrong conditions from within JUnit jupiter (5.93./1.9.3) assertAll() lambdas, preventing meaningful debugging with large sets of data. JDK currently is Oracle JDK 11.0.18.

public static final List<Arguments> testSource() {
  return List.of(
    Arguments.of(null), 
    Arguments.of("TEST1"), 
    Arguments.of(""), 
    Arguments.of(" "), 
    Arguments.of("$"), 
    ...
  );
}

@ParameterizedTest
@MethodSource("testSource")
void myTest(String testStr) {
  assertAll(
    () -> { 
      assertTrue(myMethod(testStr)) ;
    }
  );
}

Setting a conditional breakpiont in the line "assertTrue..." with e. g. "$".equals(str) will e. g. also stop at " ", which breaks looking for and stopping at specific conditions that may cause an error, with complex data sets.