• Kubernetes Submit Queue's avatar
    Merge pull request #30979 from m1093782566/fix-unnecessary-delete-rc-requests · 1e754539
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    [e2e density test] Fix unnecessary Delete RC requests when not running latency test
    
    As the following code block
    https://github.com/kubernetes/kubernetes/blob/master/test/e2e/density.go#L666-L670
    shows, after running each density test case, it will attempt to delete "additional replication controllers" even though there is **no additional replication controller**.
    
    When we are not running latency test, API Server will return "404 error code". So, I propose to move the above code block inside thedetermine statementsif `itArg.runLatencyTest{ }` , looks like:
    
    ```
    if itArg.runLatencyTest {
      ...
      for i := 1; i <= nodeCount; i++ {
        name := additionalPodsPrefix + "-" + strconv.Itoa(i)
        c.ReplicationControllers(ns).Delete(name, nil)
      }
    }
    ```
    In this way, removing RC will be executed only if we set `itArg.runLatencyTest` to be `true`. It can avoid post some necessary requests to API Server.
    
    Issuse is #30977
    1e754539
Name
Last commit
Last update
..
component/scheduler/perf Loading commit data...
e2e Loading commit data...
e2e_node Loading commit data...
fixtures/pkg/kubectl/cmd Loading commit data...
images Loading commit data...
integration Loading commit data...
kubemark Loading commit data...
soak Loading commit data...
utils Loading commit data...
.gitattributes Loading commit data...
OWNERS Loading commit data...
test_owners.csv Loading commit data...