Examples of Event_MONITOR_CONTENDED_ENTER


Examples of org.apache.harmony.jpda.tests.framework.jdwp.ParsedEvent.Event_MONITOR_CONTENDED_ENTER

            receiveEvent = debuggeeWrapper.vmMirror.receiveEvent();
        } catch (TestErrorException e) {
            printErrorAndFail("There is no event received.");
        }
        ParsedEvent[] parsedEvents = ParsedEvent.parseEventPacket(receiveEvent);
        Event_MONITOR_CONTENDED_ENTER event = (ParsedEvent.Event_MONITOR_CONTENDED_ENTER)parsedEvents[0];
       
        assertEquals("Invalid number of events,", 1, parsedEvents.length);
        assertEquals("Invalid event kind,", JDWPConstants.EventKind.MONITOR_CONTENDED_ENTER, event.getEventKind()
                , JDWPConstants.EventKind.getName(JDWPConstants.EventKind.MONITOR_CONTENDED_ENTER)
                , JDWPConstants.EventKind.getName(event.getEventKind()));
        logWriter.println("==> CHECK: Event Kind: " + JDWPConstants.EventKind.getName(JDWPConstants.EventKind.MONITOR_CONTENDED_ENTER));
       
        // Getting ID of the tested thread
        logWriter.println("==> Get testedThreadID...");
        long testedThreadID = debuggeeWrapper.vmMirror
                .getThreadID(MonitorContendedEnterAndEnteredDebuggee.TESTED_THREAD);
        assertEquals("Invalid tested thread id: ", testedThreadID
              , event.getThreadID());
        logWriter.println("==> CHECK: tested blocked thread id: " + testedThreadID );
       
        // Get monitor object from event packet
        long objID = event.getTaggedObject().objectID;
        // Check the ReferenceType of monitor object
        long refID = debuggeeWrapper.vmMirror.getReferenceType(objID);
        String actualSignature =  debuggeeWrapper.vmMirror.getReferenceTypeSignature(refID);
        assertEquals("Invalid monitor class signature: ", monitorSignature
                , actualSignature);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.