8308499: Test vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionFilter/filter001/TestDescription.java failed: VMDisconnectedException
Reviewed-by: lmesnik, kevinw
This commit is contained in:
parent
3e0bbd290c
commit
79ff72a776
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2023, 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
|
||||
@ -74,6 +74,7 @@ public class filter001 extends TestDebuggerType1 {
|
||||
|
||||
private String classExclName1 = "java";
|
||||
private String classExclName2 = "sun";
|
||||
private String classExclName3 = "jdk";
|
||||
private boolean methodExitReceived = false;
|
||||
|
||||
protected void testRun() {
|
||||
@ -103,6 +104,7 @@ public class filter001 extends TestDebuggerType1 {
|
||||
|
||||
eventRequest1.addClassExclusionFilter(classExclName1 + "*");
|
||||
eventRequest1.addClassExclusionFilter(classExclName2 + "*");
|
||||
eventRequest1.addClassExclusionFilter(classExclName3 + "*");
|
||||
eventRequest1.enable();
|
||||
|
||||
eventHandler.addListener(
|
||||
@ -111,7 +113,10 @@ public class filter001 extends TestDebuggerType1 {
|
||||
if (event instanceof MethodExitEvent) {
|
||||
methodExitReceived = true;
|
||||
String str = ((MethodExitEvent)event).location().declaringType().name();
|
||||
if (str.indexOf(classExclName1) == 0 || str.indexOf(classExclName2) == 0) {
|
||||
if (str.indexOf(classExclName1) == 0 ||
|
||||
str.indexOf(classExclName2) == 0 ||
|
||||
str.indexOf(classExclName3) == 0)
|
||||
{
|
||||
setFailedStatus("Received unexpected MethodExitEvent for excluded class:" + str);
|
||||
} else {
|
||||
display("Received expected MethodExitEvent for " + str);
|
||||
|
Loading…
x
Reference in New Issue
Block a user