本文整理汇总了Golang中github.com/cockroachdb/cockroach/util/leaktest.TestMainWithLeakCheck函数的典型用法代码示例。如果您正苦于以下问题:Golang TestMainWithLeakCheck函数的具体用法?Golang TestMainWithLeakCheck怎么用?Golang TestMainWithLeakCheck使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TestMainWithLeakCheck函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: TestMain
func TestMain(m *testing.M) {
defer func(retryOpts retry.Options) {
clientRetryOptions = retryOpts
}(clientRetryOptions)
clientRetryOptions = retry.Options{
InitialBackoff: 1 * time.Millisecond,
MaxBackoff: 1 * time.Millisecond,
}
leaktest.TestMainWithLeakCheck(m)
}
示例2: TestMain
func TestMain(m *testing.M) {
defer func(hbInterval time.Duration, retryOpts retry.Options) {
heartbeatInterval = hbInterval
clientRetryOptions = retryOpts
}(heartbeatInterval, clientRetryOptions)
heartbeatInterval = 10 * time.Millisecond
clientRetryOptions = retry.Options{
InitialBackoff: 1 * time.Millisecond,
MaxBackoff: 1 * time.Millisecond,
}
leaktest.TestMainWithLeakCheck(m)
}
示例3: TestMain
func TestMain(m *testing.M) {
leaktest.TestMainWithLeakCheck(m)
}
示例4: TestMain
func TestMain(m *testing.M) {
tracing.SetTestTracing()
leaktest.TestMainWithLeakCheck(m)
}