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

Retry when Spring tests fails to start a Server with a random port obtained in advance #4395

Merged
merged 4 commits into from
Sep 8, 2022

Commits on Aug 17, 2022

  1. Retry when Spring tests fails to start a Server with a random port …

    …obtained in advance
    
    Motivation:
    
    If a random port (0) for internal services or managed services is
    specified in Spring configuration, the Spring integration module
    allocate available ports early and use them to configure additional
    service later.
    https://github.com/line/armeria/blob/948763acc7911c951e37dbd35132edd253ea3934/spring/boot2-actuator-autoconfigure/src/main/java/com/linecorp/armeria/spring/actuate/ArmeriaSpringActuatorAutoConfiguration.java#L258-L260
    This is not a problem in production mode.
    However, in testing situation, many test servers are started with a
    random port and the available ports can be acquired by them. line#4391 line#4329
    
    Modifications:
    
    - Add `RetryableArmeriaServerGracefulShutdownLifecycle` to retry a
    server with a backoff at most N times.
    
    Result:
    
    - This is not a perfect answer for the failure but it might reduce the
      number of failures.
    - Fixes line#4391 line#4329
    ikhoon committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    bcf666d View commit details
    Browse the repository at this point in the history
  2. Javadoc

    ikhoon committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    e7fbcb7 View commit details
    Browse the repository at this point in the history
  3. Fix the test failure

    ikhoon committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    4f98c26 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2022

  1. Update spring/boot2-autoconfigure/src/test/java/com/linecorp/armeria/…

    …spring/RetryableArmeriaServerGracefulShutdownLifecycle.java
    
    Co-authored-by: minux <songmw725@gmail.com>
    ikhoon and minwoox committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    9c38f92 View commit details
    Browse the repository at this point in the history