-
Notifications
You must be signed in to change notification settings - Fork 567
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
Introduces EurekaRegistrationFeature #9789
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Laird Nelson <[email protected]>
assumeTrue(System.getProperty("runTestAgainstEurekaServer", "false").equals("true")); | ||
EurekaRegistrationFeature f = new EurekaRegistrationFeature(); | ||
f.afterStart(this.config, 8762, false); | ||
Thread.sleep(40000); // 40 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot have a test that sleeps for 40 seconds.
Also this test does not seem to assert anything - how do you check that something failed/worked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to suggestions. This test relies on the presence of an external Eureka server (see the assumeTrue
statement). It is run only manually. You need 40 seconds in such a case to test the 30-seconds-by-default lease expiration, and although Eureka has no documentation on this, various from-the-field reports suggest that bad things happen to the server if you drop this expiration time. What do you think I should do?
...ns/eureka/eureka/src/main/java/io/helidon/integrations/eureka/EurekaRegistrationFeature.java
Outdated
Show resolved
Hide resolved
...ns/eureka/eureka/src/main/java/io/helidon/integrations/eureka/EurekaRegistrationFeature.java
Outdated
Show resolved
Hide resolved
* @return {@code true} if the status change was successfully recorded for eventual registration or renewal; {@code | ||
* false} if no action was taken | ||
*/ | ||
public boolean markDown() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this public? There should be no user that can obtain an instance of a feature that is registered with the web server (there probably is, but it is not intended for users, features should only be used by webserver itself).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thought was that a health check feature can (at least technically) get a collection of registered features and mark this down according to its own whims. I can remove these if you like. Let me know what to do.
* @return {@code true} if the status change was successfully recorded for eventual registration or renewal; {@code | ||
* false} if no action was taken | ||
*/ | ||
public boolean markUp() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as below - markDown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See prior comment. Let me know what to do.
...ns/eureka/eureka/src/main/java/io/helidon/integrations/eureka/EurekaRegistrationFeature.java
Outdated
Show resolved
Hide resolved
...ns/eureka/eureka/src/main/java/io/helidon/integrations/eureka/EurekaRegistrationFeature.java
Show resolved
Hide resolved
…ound Status equality issues Signed-off-by: Laird Nelson <[email protected]>
Signed-off-by: Laird Nelson <[email protected]>
Signed-off-by: Laird Nelson <[email protected]>
Signed-off-by: Laird Nelson <[email protected]>
Signed-off-by: Laird Nelson <[email protected]>
This PR introduces
EurekaRegistrationFeature
to implement the goals described in #9704.Documentation will follow once the PR stabilizes.