Skip to content

Commit

Permalink
Improve the speed and stability of KPO tests (#26091)
Browse files Browse the repository at this point in the history
The KPO tests were occasionally failing in CI because of race
condition between delete from previous test and running the
following tests. Simply speaking the pods run via KPO well
not immediately sometimes and the following test picked them
together with the current pod and failed becasue of duplicate
pods. There was even a tearDown Delay of 1 second introduced
as workaround to combat this problem.

This PR fixes it much better. Each POD in the KPO test gets
unique label (derived from test name) and when executing the
POD this label is then used as selector, so that only the
**just started** POD in current test are selected - not any
dangling pod (being deleted) from the previous tests.

This not only removes flakiness of the tests, but also remove
the need of sleep, which speeds up the whole suite by whoooping
33 seconds (there were 33 tests to run).
  • Loading branch information
potiuk committed Aug 31, 2022
1 parent 6c57acc commit a032b8a
Showing 1 changed file with 55 additions and 42 deletions.

0 comments on commit a032b8a

Please sign in to comment.