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

unstable test TestWaitTTLJobFinish #45445

Closed
Tracked by #41316
hawkingrei opened this issue Jul 18, 2023 · 0 comments · Fixed by #45446
Closed
Tracked by #41316

unstable test TestWaitTTLJobFinish #45445

hawkingrei opened this issue Jul 18, 2023 · 0 comments · Fixed by #45446
Labels
severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@hawkingrei
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

 --- FAIL: TestWaitTTLJobFinish (0.05s)
panic: 
assert: mock: The method has been called over 1 times.
	Either do one more Mock.On("GetJob").Return(...), or remove extra call.
	This call was unexpected:
		GetJob(*context.timerCtx,int64,int64,string)
		0: &context.timerCtx{cancelCtx:(*context.cancelCtx)(0xc000178c80), timer:(*time.Timer)(nil), deadline:time.Time{wall:0xc125b5c0f955f6f6, ext:60351749793, loc:(*time.Location)(0xbfa3760)}}
		1: 1
		2: 2
		3: "c2e10aeb-86dc-4812-afea-697b2bc8a25e"
	at: [ttl/ttlworker/timer_test.go:51 ttl/ttlworker/timer.go:213 ttl/ttlworker/timer_test.go:530] [recovered]
	panic: 
assert: mock: The method has been called over 1 times.
	Either do one more Mock.On("GetJob").Return(...), or remove extra call.
	This call was unexpected:
		GetJob(*context.timerCtx,int64,int64,string)
		0: &context.timerCtx{cancelCtx:(*context.cancelCtx)(0xc000178c80), timer:(*time.Timer)(nil), deadline:time.Time{wall:0xc125b5c0f955f6f6, ext:60351749793, loc:(*time.Location)(0xbfa3760)}}
		1: 1
		2: 2
		3: "c2e10aeb-86dc-4812-afea-697b2bc8a25e"
	at: [ttl/ttlworker/timer_test.go:51 ttl/ttlworker/timer.go:213 ttl/ttlworker/timer_test.go:530]
goroutine 142 [running]:
testing.tRunner.func1.2({0x1b47c20, 0xc0012ad040})
	GOROOT/src/testing/testing.go:1526 +0x372
testing.tRunner.func1()
	GOROOT/src/testing/testing.go:1529 +0x650
panic({0x1b47c20, 0xc0012ad040})
	GOROOT/src/runtime/panic.go:890 +0x263
github.com/stretchr/testify/mock.(*Mock).fail(0xc000617ef0, {0x246a6e2, 0xa5}, {0xc0012a6d80, 0x4, 0x4})
	external/com_github_stretchr_testify/mock/mock.go:332 +0x1db
github.com/stretchr/testify/mock.(*Mock).MethodCalled(0xc000617ef0, {0x42fae84, 0x6}, {0xc0012a6a80, 0x4, 0x4})
	external/com_github_stretchr_testify/mock/mock.go:480 +0x33d
github.com/stretchr/testify/mock.(*Mock).Called(0xc0012372f0?, {0xc0012a6a80, 0x4, 0x4})
	external/com_github_stretchr_testify/mock/mock.go:464 +0x1a5
github.com/pingcap/tidb/ttl/ttlworker.(*mockJobAdapter).GetJob(0xc000617ef0, {0x3bf6960?, 0xc00117eea0}, 0xc001182100?, 0x20?, {0xc0012372f0, 0x24})
	ttl/ttlworker/timer_test.go:51 +0x205
github.com/pingcap/tidb/ttl/ttlworker.(*ttlTimerHook).waitJobFinished(0xc000b26de0, 0xc0001e2fc0, 0xc000364060, {0xc001182100, 0x20}, {0xc0012372f0, 0x24}, {0xc125b5b17954f38f, 0xffffffff9dc0af4f, 0xbfa3760})
	ttl/ttlworker/timer.go:213 +0x64e
github.com/pingcap/tidb/ttl/ttlworker.TestWaitTTLJobFinish(0x0?)
	ttl/ttlworker/timer_test.go:530 +0x3df5
testing.tRunner(0xc000af9380, 0x24c6550)
	GOROOT/src/testing/testing.go:1576 +0x217
created by testing.(*T).Run
	GOROOT/src/testing/testing.go:1629 +0x806
-- 

https://tiprow.hawkingrei.com/view/gs/pingcapprow/pr-logs/pull/pingcap_tidb/45434/tiprow_fast_test/1681233855941447680

4. What is your TiDB version? (Required)

@hawkingrei hawkingrei added the type/bug The issue is confirmed as a bug. label Jul 18, 2023
@ti-chi-bot ti-chi-bot bot added may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Jul 18, 2023
@lcwangchao lcwangchao added sig/sql-infra SIG: SQL Infra and removed may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants