[jira] Commented: (DERBY-3503) Change stress.multi to dump thread stacks before killing off testers with jdk 1.5 and higher
[ https://issues.apache.org/jira/browse/DERBY-3503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12577002#action_12577002 ] Knut Anders Hatlen commented on DERBY-3503: --- Thanks for updating the patch. Looks much better now! Just to continue the nit-picking (sorry...), you missed one occurrence of incorrect indentation in a comment in MultiTest (probably a tab size issue). Also, in this code: + if (j.atLeast(1,5)) + { + Class c = Class.forName(org.apache.derbyTesting.functionTests.util.ThreadDump); and in this code: + catch (Exception e) + { + // if we get an exception trying to get a thread dump. Just print it to the log and continue. I guess you intended to move all but the first line one indentation level left to save some space. And, talking about saving space, I don't think I would have bothered unwrapping the PrivilegedActionException and the InvocationTargetException, as the original exception is in the chain and its stack trace is printed anyway. Not a big deal, but it would perhaps make the code a bit cleaner. And, since you're using Emacs... :) I have this function in ~/.emacs: (defun kah:clean-patch () (interactive) (save-excursion (query-replace-regexp ^\\+\\(\\([^\n]*[^ \t\n]\\)\\|\\)[ \t]+$ +\\1 nil (point-min) (point-max Each time after I download a patch (or before I upload a patch), I open the patch in Emacs and type M-x kah:clean-patch to get rid of trailing spaces. Change stress.multi to dump thread stacks before killing off testers with jdk 1.5 and higher Key: DERBY-3503 URL: https://issues.apache.org/jira/browse/DERBY-3503 Project: Derby Issue Type: Improvement Components: Test Affects Versions: 10.4.0.0 Reporter: Kathey Marsden Assignee: Kathey Marsden Priority: Minor Attachments: derby-3503_diff.txt, derby-3503_diff.txt Jdk 1.5 introduced Thread.getAllStackTraces() which can be used to print a thread dump programatically. The test stress.multi kills off its testers if it reaches a deadlock or the testers can't complete on their own. It would be helpful in this case to get a thread dump automatically. The code could only be enabled for jdk 1.5 and higher. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3503) Change stress.multi to dump thread stacks before killing off testers with jdk 1.5 and higher
[ https://issues.apache.org/jira/browse/DERBY-3503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12577072#action_12577072 ] Kathey Marsden commented on DERBY-3503: --- Knut said ... don't think I would have bothered unwrapping the PrivilegedActionException and the InvocationTargetException, as the original exception is in the chain and its stack trace is printed anyway. Not a big deal, but it would perhaps make the code a bit cleaner. hmmm the reason I was unwrapping it was because I was not seeing the chained exception print. It would be hard to reproduce now. Maybe that was with jdk 1.4.2, but anyway I think I will leave it as is. Thanks Knut for the review. Change stress.multi to dump thread stacks before killing off testers with jdk 1.5 and higher Key: DERBY-3503 URL: https://issues.apache.org/jira/browse/DERBY-3503 Project: Derby Issue Type: Improvement Components: Test Affects Versions: 10.4.0.0 Reporter: Kathey Marsden Assignee: Kathey Marsden Priority: Minor Attachments: derby-3503_diff.txt, derby-3503_diff.txt Jdk 1.5 introduced Thread.getAllStackTraces() which can be used to print a thread dump programatically. The test stress.multi kills off its testers if it reaches a deadlock or the testers can't complete on their own. It would be helpful in this case to get a thread dump automatically. The code could only be enabled for jdk 1.5 and higher. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3503) Change stress.multi to dump thread stacks before killing off testers with jdk 1.5 and higher
[ https://issues.apache.org/jira/browse/DERBY-3503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12576724#action_12576724 ] Knut Anders Hatlen commented on DERBY-3503: --- The patch basically looks good. Some minor comments: - ThreadDump.java lacks ASL header - The changes to the signatures of main() and execTesters() seem to be pure white-space changes (changing tabs to mix of tabs/spaces) - The changes to main()'s javadoc look unintended (changes tabs to spaces, and incorrectly changes FileNotFoundException to ParseException) - The indentation for the new code in execTesters() seems to be off. Have you checked that your IDE has tab stop set to 4? - This code could be written as if (j.atLeast(1, 5)) instead: +if (j.getMajorNumber() == 1 j.getMinorNumber() = 5 || +j.getMajorNumber() 1) - ThreadDump.java is a bit hard to read since it's not properly indented - The patch adds some lines with trailing spaces Change stress.multi to dump thread stacks before killing off testers with jdk 1.5 and higher Key: DERBY-3503 URL: https://issues.apache.org/jira/browse/DERBY-3503 Project: Derby Issue Type: Improvement Components: Test Affects Versions: 10.4.0.0 Reporter: Kathey Marsden Assignee: Kathey Marsden Priority: Minor Attachments: derby-3503_diff.txt Jdk 1.5 introduced Thread.getAllStackTraces() which can be used to print a thread dump programatically. The test stress.multi kills off its testers if it reaches a deadlock or the testers can't complete on their own. It would be helpful in this case to get a thread dump automatically. The code could only be enabled for jdk 1.5 and higher. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.