mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
Merge pull request #28319 from grodrigues3/revert-comments-tLogf
Automatic merge from submit-queue reverted the code from 23688 that cause race condition with older version of Go ```release-note * release-note-None ``` []()
This commit is contained in:
commit
ffff1ab63c
@ -350,10 +350,7 @@ func TestEventf(t *testing.T) {
|
|||||||
recorder := recorderWithFakeClock(api.EventSource{Component: "eventTest"}, eventBroadcaster, clock)
|
recorder := recorderWithFakeClock(api.EventSource{Component: "eventTest"}, eventBroadcaster, clock)
|
||||||
for index, item := range table {
|
for index, item := range table {
|
||||||
clock.Step(1 * time.Second)
|
clock.Step(1 * time.Second)
|
||||||
// TODO: uncomment this after we upgrade to Go 1.6.1.
|
logWatcher1 := eventBroadcaster.StartLogging(t.Logf) // Prove that it is useful
|
||||||
// testing.(*common).log() is racing with testing.(*T).report() in Go 1.6.
|
|
||||||
// See #23533 for more details.
|
|
||||||
// logWatcher1 := eventBroadcaster.StartLogging(t.Logf) // Prove that it is useful
|
|
||||||
logWatcher2 := eventBroadcaster.StartLogging(func(formatter string, args ...interface{}) {
|
logWatcher2 := eventBroadcaster.StartLogging(func(formatter string, args ...interface{}) {
|
||||||
if e, a := item.expectLog, fmt.Sprintf(formatter, args...); e != a {
|
if e, a := item.expectLog, fmt.Sprintf(formatter, args...); e != a {
|
||||||
t.Errorf("Expected '%v', got '%v'", e, a)
|
t.Errorf("Expected '%v', got '%v'", e, a)
|
||||||
@ -372,8 +369,7 @@ func TestEventf(t *testing.T) {
|
|||||||
actualEvent := <-createEvent
|
actualEvent := <-createEvent
|
||||||
validateEvent(strconv.Itoa(index), actualEvent, item.expect, t)
|
validateEvent(strconv.Itoa(index), actualEvent, item.expect, t)
|
||||||
}
|
}
|
||||||
// TODO: uncomment this after we upgrade to Go 1.6.1.
|
logWatcher1.Stop()
|
||||||
// logWatcher1.Stop()
|
|
||||||
logWatcher2.Stop()
|
logWatcher2.Stop()
|
||||||
}
|
}
|
||||||
sinkWatcher.Stop()
|
sinkWatcher.Stop()
|
||||||
@ -601,10 +597,7 @@ func TestEventfNoNamespace(t *testing.T) {
|
|||||||
|
|
||||||
for index, item := range table {
|
for index, item := range table {
|
||||||
clock.Step(1 * time.Second)
|
clock.Step(1 * time.Second)
|
||||||
// TODO: uncomment this after we upgrade to Go 1.6.1.
|
logWatcher1 := eventBroadcaster.StartLogging(t.Logf) // Prove that it is useful
|
||||||
// testing.(*common).log() is racing with testing.(*T).report() in Go 1.6.
|
|
||||||
// See #23533 for more details.
|
|
||||||
// logWatcher1 := eventBroadcaster.StartLogging(t.Logf) // Prove that it is useful
|
|
||||||
logWatcher2 := eventBroadcaster.StartLogging(func(formatter string, args ...interface{}) {
|
logWatcher2 := eventBroadcaster.StartLogging(func(formatter string, args ...interface{}) {
|
||||||
if e, a := item.expectLog, fmt.Sprintf(formatter, args...); e != a {
|
if e, a := item.expectLog, fmt.Sprintf(formatter, args...); e != a {
|
||||||
t.Errorf("Expected '%v', got '%v'", e, a)
|
t.Errorf("Expected '%v', got '%v'", e, a)
|
||||||
@ -624,8 +617,7 @@ func TestEventfNoNamespace(t *testing.T) {
|
|||||||
validateEvent(strconv.Itoa(index), actualEvent, item.expect, t)
|
validateEvent(strconv.Itoa(index), actualEvent, item.expect, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: uncomment this after we upgrade to Go 1.6.1.
|
logWatcher1.Stop()
|
||||||
// logWatcher1.Stop()
|
|
||||||
logWatcher2.Stop()
|
logWatcher2.Stop()
|
||||||
}
|
}
|
||||||
sinkWatcher.Stop()
|
sinkWatcher.Stop()
|
||||||
|
Loading…
Reference in New Issue
Block a user