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

Mamta A. Satoor commented on DERBY-6012:
----------------------------------------

Knut, thanks for reviewing the code. 
functionTests.util.TestUtil.dumpAllStackTracesIfSupported() sounds like a good 
idea but it takes a PrintWriter argument which we don't have access to. I can 
change the signature of 
functionTests.util.TestUtil.dumpAllStackTracesIfSupported() and have it return 
the String it writes to PrintWriter. So, the method will check if the 
PrintWriter is null, if yes, then do nothing. If not null, write the String to 
the PrintWriter. Additionally, irrespective of the value of PrintWriter, return 
the String to the caller. Then my code can take that String and send it to 
fail() method as shown below. Thanks
                    //DERBY-6012 print thread dump and java core 
                    StringBuffer sb = new StringBuffer(msg); 
                    
sb.append(functionTests.util.TestUtil.dumpAllStackTracesIfSupported(null)); 
                    JVMInfo.javaDump(); 
                    fail(sb.toString()); 



                
> Print thread dump and dump javacore if NetworkServerTestSetup has to kill off 
> the Network Server start up  process due to timeout
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6012
>                 URL: https://issues.apache.org/jira/browse/DERBY-6012
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.8.3.0
>         Environment: 
>            Reporter: Kathey Marsden
>            Assignee: Mamta A. Satoor
>             Fix For: 10.10.0.0
>
>         Attachments: DERBY6012_patch1_diff.txt, DERBY6012_patch2_diff.txt
>
>
> If Network Server startup hangs or times out as in DERBY-5991, we should 
> generate a javacore or a thread dump so the cause of the problem can be more 
> easily diagnosed.

--
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