Skip to content

Conversation

@pugnascotia
Copy link
Contributor

Backport of #45794 to 7.x. Convert most awaitBusy calls to
assertBusy, and use asserts where possible.

Backport of elastic#45794 to 7.x. Convert most `awaitBusy` calls to
`assertBusy`, and use asserts where possible. Follows on from elastic#28548 by
@liketic.

There were a small number of places where it didn't make sense to me to
call `assertBusy`, so I kept the existing calls but renamed the method to
`waitUntil`. This was partly to better reflect its usage, and partly so
that anyone trying to add a new call to awaitBusy wouldn't be able to find
it.

I also didn't change the usage in `TransportStopRollupAction` as the
comments state that the local awaitBusy method is a temporary
copy-and-paste.

Other changes:

  * Rework `waitForDocs` to scale its timeout. Instead of calling
    `assertBusy` in a loop, work out a reasonable overall timeout and await
    just once.
  * Some tests failed after switching to `assertBusy` and had to be fixed.
  * Correct the expect templates in AbstractUpgradeTestCase.  The ES
    Security team confirmed that they don't use templates any more, so
    remove this from the expected templates. Also rewrite how the setup
    code checks for templates, in order to give more information.
  * Remove an expected ML template from XPackRestTestConstants The ML team
    advised that the ML tests shouldn't be waiting for any
    `.ml-notifications*` templates, since such checks should happen in the
    production code instead.
  * Also rework the template checking code in `XPackRestTestHelper` to give
    more helpful failure messages.
@pugnascotia pugnascotia added :Core/Infra/Core Core issues without another label backport 7x v7.5.0 labels Sep 25, 2019
@pugnascotia pugnascotia requested a review from rjernst September 25, 2019 12:50
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@pugnascotia pugnascotia merged commit 53a4d21 into elastic:7.x Sep 29, 2019
@pugnascotia pugnascotia deleted the 28450-remove-await-busy-7-x branch September 29, 2019 11:21
droberts195 pushed a commit that referenced this pull request Sep 30, 2019
#47289)

With this change the test setup for ML config upgrade
tests only waits for v6.6+ ML index templates to be
installed if the old cluster is running version 6.6.0
or higher.

Previously it was always waiting, but timing out without
failing the test if the templates were not installed
within 10 seconds, effectively just adding a pointless
10 second sleep to BWC tests against versions earlier
than 6.6.0. This problem was exposed by #47112.

Fixes #47286
droberts195 pushed a commit that referenced this pull request Sep 30, 2019
#47289)

With this change the test setup for ML config upgrade
tests only waits for v6.6+ ML index templates to be
installed if the old cluster is running version 6.6.0
or higher.

Previously it was always waiting, but timing out without
failing the test if the templates were not installed
within 10 seconds, effectively just adding a pointless
10 second sleep to BWC tests against versions earlier
than 6.6.0. This problem was exposed by #47112.

Fixes #47286
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :Core/Infra/Core Core issues without another label v7.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants