• 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
.github Loading commit data...
Godeps Loading commit data...
api/swagger-spec Loading commit data...
build Loading commit data...
cluster Loading commit data...
cmd Loading commit data...
contrib Loading commit data...
docs Loading commit data...
examples Loading commit data...
federation Loading commit data...
hack Loading commit data...
hooks Loading commit data...
logo Loading commit data...
pkg Loading commit data...
plugin Loading commit data...
release Loading commit data...
staging/src/k8s.io/client-go Loading commit data...
test Loading commit data...
third_party Loading commit data...
vendor Loading commit data...
www Loading commit data...
.generated_docs Loading commit data...
.gitignore Loading commit data...
CHANGELOG.md Loading commit data...
CONTRIB.md Loading commit data...
CONTRIBUTING.md Loading commit data...
DESIGN.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
Makefile.generated_files Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...
Vagrantfile Loading commit data...
code-of-conduct.md Loading commit data...
labels.yaml Loading commit data...