Hi Shanliang, I can’t quite see how the test can fail in this way. When the ClassPrepareEvent happens, the debuggee will be suspended. So when addFieldWatch() is called, the debuggee should not have moved.
One problem I do see with the test is that it does not wait for a VMStartEvent before setting up requests. I’m not sure if that could cause the failure in the bug report, though. /Staffan On 11 feb 2014, at 15:13, shanliang <shanliang.ji...@oracle.com> wrote: > Hi , > > The problem could be that FieldMonitor did not have enough time to > "addFieldWatch" but the vm to monitor (TestPostFieldModification) was already > ended. > > So we should make sure that TestPostFieldModification exits after > FieldMonitor has done necessary. The solution proposed here is that > FieldMonitor creates a file after adding field watching, and > TestPostFieldModification quits only after finding the file. > > web: > http://icncweb.fr.oracle.com/~shjiang/webrev/8007710/00/ > > bug: > https://bugs.openjdk.java.net/browse/JDK-8007710 > > Thanks, > Shanliang