8222667: vmTestbase/nsk/jdi/ThreadStartRequest/addThreadFilter/addthreadfilter002/TestDescription.java failed with "event IS NOT a breakpoint"
Reviewed-by: gadams, sspitsyn, jcbeyler, cjplummer
This commit is contained in:
parent
62109f5906
commit
5a264ba9db
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -479,12 +479,25 @@ public class addthreadfilter002 {
|
||||
throws JDITestRuntimeException {
|
||||
|
||||
log2("breakpointForCommunication");
|
||||
getEventSet();
|
||||
|
||||
if (eventIterator.nextEvent() instanceof BreakpointEvent)
|
||||
return;
|
||||
|
||||
throw new JDITestRuntimeException("** event IS NOT a breakpoint **");
|
||||
while (true) {
|
||||
getEventSet();
|
||||
while (eventIterator.hasNext()) {
|
||||
Event event = eventIterator.nextEvent();
|
||||
if (event instanceof BreakpointEvent) {
|
||||
return;
|
||||
} else if (event instanceof ThreadStartEvent) {
|
||||
// It might be the case that while the thread start request was enabled
|
||||
// some threads not related to the test ( e.g. JVMCI threads) were started
|
||||
// and generated thread start events. We ignore these thread start events
|
||||
// and keep waiting for a breakpoint event.
|
||||
ThreadStartEvent tse = (ThreadStartEvent) event;
|
||||
log2("ThreadStartEvent is received while waiting for a breakpoint" +
|
||||
" event, thread: : " + tse.thread().name());
|
||||
continue;
|
||||
}
|
||||
throw new JDITestRuntimeException("** event IS NOT a breakpoint or a thread start **");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user