Output test description in TestPreemption

Now we are facing flake test of TestPreemption due to less available
node. TestPreemption consists of multiple test cases and the resource
is shared in them.
At this time, we cannot see what test cases run before the flake
happens. So it is better to know that to distinguish the cleanup of
pods is not completed or not.
This commit is contained in:
Kenichi Omichi 2019-12-31 00:14:03 +00:00
parent a1364be012
commit 00abe6d505

View File

@ -392,6 +392,7 @@ func TestPreemption(t *testing.T) {
} }
for _, test := range tests { for _, test := range tests {
t.Logf("================ Running test: %v\n", test.description)
filter.Tokens = test.initTokens filter.Tokens = test.initTokens
filter.Unresolvable = test.unresolvable filter.Unresolvable = test.unresolvable
pods := make([]*v1.Pod, len(test.existingPods)) pods := make([]*v1.Pod, len(test.existingPods))
@ -583,6 +584,7 @@ func TestPodPriorityResolution(t *testing.T) {
pods := make([]*v1.Pod, 0, len(tests)) pods := make([]*v1.Pod, 0, len(tests))
for _, test := range tests { for _, test := range tests {
t.Logf("================ Running test: %v\n", test.Name)
t.Run(test.Name, func(t *testing.T) { t.Run(test.Name, func(t *testing.T) {
pod, err := runPausePod(cs, test.Pod) pod, err := runPausePod(cs, test.Pod)
if err != nil { if err != nil {