Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TimedOutTestsListener to print the full thread dump on test timeout #6

Closed
wants to merge 1 commit into from

Conversation

windie
Copy link
Member

@windie windie commented Feb 20, 2016

Motivation:

See netty/netty#3172

Modifications:

Copy TimedOutTestsListener from https://github.com/apache/hadoop/blob/18f9b77a321b225677ce23c503b41d21478fc4a7/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/TimedOutTestsListener.java

Result:

If a test is set the timeout parameter using junit's @test(timeout = ...) and the timeout is triggered, a full stack trace dump will be outputted and also output the deadlocks if any.

@windie
Copy link
Member Author

windie commented Feb 22, 2016

cc @trustin


static final String TEST_TIMED_OUT_PREFIX = "test timed out after";

private static String INDENT = " ";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this could be translated to: missing final

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and.. how about using '\t' instead? It seems like Throwable.printStackTrace() indents with a tab.

@trustin
Copy link
Member

trustin commented Feb 23, 2016

Global comment: Please use 4-space indentation like we do in netty/netty

* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.netty.build.test;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about io.netty.build.junit?

@windie
Copy link
Member Author

windie commented Feb 24, 2016

Updated

@trustin
Copy link
Member

trustin commented Feb 24, 2016

LGTM. Please squash so I can cherry-pick. Thanks!

Motivation:

See netty/netty#3172

Modifications:

Copy TimedOutTestsListener from https://github.com/apache/hadoop/blob/18f9b77a321b225677ce23c503b41d21478fc4a7/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/TimedOutTestsListener.java

Result:

If a test is set the timeout parameter using junit's @test(timeout = ...) and the timeout is triggered, a full stack trace dump will be outputted and also output the deadlocks if any.
@windie
Copy link
Member Author

windie commented Feb 25, 2016

squashed

@windie
Copy link
Member Author

windie commented Feb 25, 2016

@trustin Will you release soon? I can submit a PR for netty to add this timeout listener after that.

@windie
Copy link
Member Author

windie commented Mar 4, 2016

ping @trustin

@trustin
Copy link
Member

trustin commented Mar 4, 2016

Thanks for your patient. Cherry-picked: d513280

Will perform the release process and add a comment here when it's out.

@trustin trustin closed this Mar 4, 2016
@trustin
Copy link
Member

trustin commented Mar 4, 2016

Finished the release process. Should appear in the central repository in 30 minutes.

@trustin trustin self-assigned this Mar 4, 2016
windie added a commit to windie/netty that referenced this pull request Mar 4, 2016
Motivation:

See netty#3172

Modifications:

netty/netty-build#6 added a junit timeout listener to the netty-build project. This patch just set it up.

Result:

If a test is set the timeout parameter using junit's @test(timeout = ...) and the timeout is triggered, a full stack trace dump will be outputted and also output the deadlocks if any.
@windie windie deleted the timeout-listener branch March 4, 2016 07:09
normanmaurer pushed a commit to netty/netty that referenced this pull request Mar 4, 2016
Motivation:

See #3172

Modifications:

netty/netty-build#6 added a junit timeout listener to the netty-build project. This patch just set it up.

Result:

If a test is set the timeout parameter using junit's @test(timeout = ...) and the timeout is triggered, a full stack trace dump will be outputted and also output the deadlocks if any.
normanmaurer pushed a commit to netty/netty that referenced this pull request Mar 4, 2016
Motivation:

See #3172

Modifications:

netty/netty-build#6 added a junit timeout listener to the netty-build project. This patch just set it up.

Result:

If a test is set the timeout parameter using junit's @test(timeout = ...) and the timeout is triggered, a full stack trace dump will be outputted and also output the deadlocks if any.
pulllock pushed a commit to pulllock/netty that referenced this pull request Oct 19, 2023
Motivation:

See netty#3172

Modifications:

netty/netty-build#6 added a junit timeout listener to the netty-build project. This patch just set it up.

Result:

If a test is set the timeout parameter using junit's @test(timeout = ...) and the timeout is triggered, a full stack trace dump will be outputted and also output the deadlocks if any.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants