Skip to content

Conversation

@wind57
Copy link
Contributor

@wind57 wind57 commented Oct 5, 2024

No description provided.

@wind57 wind57 changed the title fix change delete sequence Oct 5, 2024
long startTime = System.currentTimeMillis();
if (deployment != null) {
client.apps().deployments().inNamespace(namespace).resource(deployment).delete();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this really came out of a different thing I am actively working on: I am trying to refactor integration tests, so that they run faster.

While working on my first PR in this direction, I hit an issue where they are still not as fast as I would like them to be. Debugging, showed that the vast majority of time is eaten by the fact that removing deployment and its pods eats the majority of time. This PR fixes that:

  • first find the pods of a deployment, remove those (with --force)
  • then remove deployment

How much that saves us? In the current tests that I am working on, it shows around 30 seconds saving time for each integration test.

@wind57
Copy link
Contributor Author

wind57 commented Oct 5, 2024

@ryanjbaxter ready to be looked, I've compared the times of a few previous runs and running on github is not that impressive of a time reduction, a few minutes, but since we distribute tests, it does not have a "wow" effect. It should be close to that for your internal jenkins though (as far as I understand there you don't run tests in parallel).

P.S. Once I am done with all integration tests re-factor, we should see much better times in github also.

@wind57 wind57 marked this pull request as ready for review October 5, 2024 16:12
@wind57 wind57 changed the title change delete sequence change deployment delete sequence for integration tests Oct 5, 2024
@ryanjbaxter ryanjbaxter merged commit 96f3b37 into spring-cloud:3.1.x Oct 6, 2024
14 checks passed
@ryanjbaxter ryanjbaxter modified the milestones: 3.2.0-M2, 3.1.4 Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

No open projects
Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants