mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-07 10:00:15 +00:00
client-go/rest: finish conversion to contextual logging
The remaining calls can be converted without API changes. Kubernetes-commit: 7821abf2ae289673bbfa3b9a6b8b34f5196c7c7e
This commit is contained in:
committed by
Kubernetes Publisher
parent
7aa9904196
commit
5d128adc87
@@ -2476,6 +2476,7 @@ func TestRequestPreflightCheck(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestThrottledLogger(t *testing.T) {
|
||||
logger := klog.Background()
|
||||
now := time.Now()
|
||||
oldClock := globalThrottledLogger.clock
|
||||
defer func() {
|
||||
@@ -2490,7 +2491,7 @@ func TestThrottledLogger(t *testing.T) {
|
||||
wg.Add(10)
|
||||
for j := 0; j < 10; j++ {
|
||||
go func() {
|
||||
if _, ok := globalThrottledLogger.attemptToLog(); ok {
|
||||
if _, ok := globalThrottledLogger.attemptToLog(logger); ok {
|
||||
logMessages++
|
||||
}
|
||||
wg.Done()
|
||||
@@ -4175,6 +4176,7 @@ warnings.go] "Warning: warning 2" logger="TestLogger"
|
||||
}
|
||||
|
||||
for name, tc := range testcases {
|
||||
//nolint:logcheck // Intentionally testing with plain klog here.
|
||||
t.Run(name, func(t *testing.T) {
|
||||
state := klog.CaptureState()
|
||||
defer state.Restore()
|
||||
|
Reference in New Issue
Block a user