[ 
https://issues.apache.org/jira/browse/DERBY-6307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13745270#comment-13745270
 ] 

ahsan shamsudeen commented on DERBY-6307:
-----------------------------------------

I need to write test case for the following method.

public static void javaDump() {
        if (isIBMJVM()) {
            Class<?> ibmc = null;
            try {
                ibmc = Class.forName("com.ibm.jvm.Dump");
                final Method ibmm = ibmc.getMethod("JavaDump", new Class<?>[] 
{});
                
                AccessController.doPrivileged(new 
PrivilegedExceptionAction<Object>() {
                    public Object run() throws IllegalAccessException,
                            MalformedURLException, InstantiationException,
                            InvocationTargetException {
                        return ibmm.invoke(null, new Object[] {});
                        
                    }
                });
            } catch (Exception e) {
                if (SanityManager.DEBUG) {
                    SanityManager
                            .THROWASSERT(
                                    "Failed to execute 
com.ibm.jvm.Dump.JavaDump in IBM JVM",
                                    e);
                }
            }
        }
    }


Since, I don't have an IBM JVM, I couldn't execute this in my 
environment.Because the condition isIBMJVM() is always tends to be false in my 
environment.

Bryan, correct me If I'm wrong.

Thanks,
Ahsan  
                
> Improve the code coverage of org.apache.derby.iapi.services.info.JVMInfo
> ------------------------------------------------------------------------
>
>                 Key: DERBY-6307
>                 URL: https://issues.apache.org/jira/browse/DERBY-6307
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>            Reporter: ahsan shamsudeen
>            Assignee: ahsan shamsudeen
>            Priority: Minor
>         Attachments: DERBY-6307.patch, DERBY-6307Temp.patch
>
>
> According to the coverage reports, 
> org.apache.derby.iapi.services.info.JVMInfo is poorly exercised by the Derby 
> regression tests.
> This sub-task is to improve that test coverage.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to