hang

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Overview

Include:

import (
	_ "github.com/Unity-Technologies/go-tutl-internal/hang" // ^C gives stack dumps.
)

in just one of your *_test.go files (per module) so that you can interrupt (such as via typing Ctrl-C) an infinite loop or otherwise hanging test run and be shown, in response, the stack traces of everything that is running.

If you have your own TestMain() function, then just call:

go tutl.ShowStackOnInterrupt()

from it rather than loading this module (which would fail).

Note that loading this module does nothing useful in non-test code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestMain

func TestMain(m *testing.M)

If your tests hang, interrupt them (Ctrl-C) to get stack dumps of what is running.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL