-
-
Save unconsolable/2c94e5bd5dac14e963c356b14d279846 to your computer and use it in GitHub Desktop.
timeout sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sample1_test | |
import ( | |
"testing" | |
"time" | |
. "github.com/pingcap/check" | |
) | |
func TestParallel1(t *testing.T) { | |
t.Parallel() | |
if 1 == 2 { | |
t.Fatalf("1") | |
} | |
} | |
func TestParallel2(t *testing.T) { | |
t.Parallel() | |
if 1 == 2 { | |
t.Fatalf("2") | |
} | |
} | |
func TestSerial(t *testing.T) { | |
CustomVerboseFlag = true | |
*CustomParallelSuiteFlag = true | |
TestingT(t) | |
} | |
type Suite1 struct{} | |
var _ = SerialSuites(&Suite1{}) | |
func (s *Suite1) SetUpSuite(c *C) { | |
} | |
func (s *Suite1) TearDownSuite(c *C) { | |
} | |
func (s *Suite1) TestX(c *C) { | |
time.Sleep(time.Minute) | |
} | |
func TestParallel3(t *testing.T) { | |
t.Parallel() | |
if 1 == 2 { | |
t.Fatalf("3") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment