On Thu, 25 Aug 2022 15:15:38 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

>> We currently have no tests for co-located MethodEntry, Step, and Breakpoint 
>> events. We should make sure they are being properly co-located as described 
>> in the JDI spec, and also do special test cases for 
>> [JDK-8292217](https://bugs.openjdk.org/browse/JDK-8292217).
>> 
>> https://docs.oracle.com/en/java/javase/17/docs/api/jdk.jdi/com/sun/jdi/event/EventSet.html
>> 
>> And sorry in advance that the logic is a bit hard to follow in this test due 
>> to having multiple test cases, and dealing with the async nature of JDI 
>> testing. All I can say is that is used to be a lot worse before I did 
>> multiple passes to improve it.
>
> Chris Plummer has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Assert that we are at the expected breakpoint.

I had to undo the last change that checked if the breakpoint was the expected 
one. There were two issues. The first was that the breakpoints are not in 
order, so it always threw an exception on the first breakpoint. However, the 
test still passed. That was because of a pre-existing bug. I declared 
`testFailed` locally within the test class. The overrode the one declared in 
`TestScaffold`, and which gets set `false` if there is an exception thrown in 
the event handler. I got rid of the override, and then test started to properly 
fail due to the incorrect breakpoint checks, which I have now also removed.

-------------

PR: https://git.openjdk.org/jdk/pull/9840

Reply via email to