Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(engine-rest): retry server start when port still bound #3536

Merged
merged 2 commits into from
Jul 4, 2023

Conversation

tmetzke
Copy link
Member

@tmetzke tmetzke commented Jun 30, 2023

  • Supports retrying server startups when the address is still bound. Occasionally, the OS can take more time to release the port physically after we stop our test server instance. Before we start it again for the next test class, we might have to wait and retry.

related to #3535

* Supports retrying server startups when the address is still bound.
  Occasionally, the OS can take more time to release the port physically
  after we stop our test server instance. Before we start it again for the
  next test class, we might have to wait and retry.

related to #3535
@tmetzke tmetzke added the ci:rest-api Runs extra builds for the REST API (currently only WLS compatibility builds). label Jun 30, 2023
@tmetzke tmetzke self-assigned this Jun 30, 2023
@tmetzke
Copy link
Member Author

tmetzke commented Jun 30, 2023

  • CI looks good.
  • Successful manual local tests:
    • Environments:
      • Engine REST with profile resteasy
      • Engine REST with profile jersey
      • Engine REST Jakarta with profile resteasy
      • For each of the above:
        • Ran a REST test class like HistoricDetailRestServiceQueryTest that uses the Embedded Server.
        • Ran a test class like NoServletEmptyBodyFilterTest that uses a servlet container (Tomcat or Undertow).
    • Procedure:
      • Start a local server (e.g. Camunda Run with REST API) on the REST tests ports 38080 (Javax REST) and 38081 (Jakarta REST).
      • Set a debug breakpoint in the respective server bootstrap class before the actual REST test server is started.
      • Run the respective test class and let the server startup fail once, running into the retry handling.
      • Stop the local server.
      • Run a first retry and see the server start up correctly and the test pass.

@tmetzke tmetzke requested a review from mboskamp June 30, 2023 11:19
@tmetzke tmetzke linked an issue Jun 30, 2023 that may be closed by this pull request
1 task
Copy link
Member

@mboskamp mboskamp left a comment

Choose a reason for hiding this comment

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

👍 Looks good

@tmetzke tmetzke merged commit 6249ebb into master Jul 4, 2023
@tmetzke tmetzke deleted the 3535-rest-test-server-retry branch July 4, 2023 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:rest-api Runs extra builds for the REST API (currently only WLS compatibility builds).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REST stages occasionally fail with Address already in use exception
2 participants