[KeyManager] Fix parallel tests
- Dominant language
- C
- Stars
- 309
- Forks
- 118
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 33
Description
Ref the code in https://github.com/NilanjanDaw/go-tpm-tools/blob/e114666a20893802fd44ab85b7402d3dc90f4f68/keymanager/workload_service/server_test.go#L1028-L1031
```go
oldTimeout := ClaimsResponseTimeout
ClaimsResponseTimeout = 10 * time.Millisecond
defer func() { ClaimsResponseTimeout = oldTimeout }()
```
Based on comment https://github.com/google/go-tpm-tools/pull/681#discussion_r2888714738 if we ever add t.Parallel() it could result in flaky tests.
In future we can make this configurable field in Server struct
Contributor guide
Research direction
Start with keymanager/workload_service/server_test.go around lines 1028-1031 and review the ClaimsResponseTimeout setup. Check the discussion on pull request 681 for the parallel-test concern, then make the timeout handling safe for parallel tests and verify the affected test behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100