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

feat: support Eureka discovery #242

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft

Conversation

Roiocam
Copy link
Member

@Roiocam Roiocam commented May 28, 2024

@pjfanning pjfanning added this to the 1.1.0-M2 milestone Jun 6, 2024
# default discovery service group.
group-name = "DEFAULT_GROUP"
# default eureka registration status page url
status-page-url = ""
Copy link
Contributor

Choose a reason for hiding this comment

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

@Roiocam most of these configs are unused - can we remove the unused ones?

"work for defaults" in {
val lookupService = new EurekaServiceDiscovery()
val resolved = lookupService.lookup("BANK-ACCOUNT", 10.seconds).futureValue
resolved.addresses should contain(
Copy link
Contributor

Choose a reason for hiding this comment

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

With the changes that I have committed, the embeddedEurekaServer is starting and can be contacted.

The response for this test though is:

[ERROR] [09/23/2024 15:16:35.239] [test-pekko.actor.default-dispatcher-5] [EurekaServiceDiscovery(pekko://test)] Failed to unmarshal Eureka response status [404 Not Found], entity: [{
"servlet":"default",
"message":"Not Found",
"url":"/eureka/apps/BANK-ACCOUNT",
"status":"404"
}], uri: [http://127.0.0.1:53003/eureka/apps/BANK-ACCOUNT]

Copy link
Member Author

Choose a reason for hiding this comment

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

did they register it on startup? or you has been loaded in Eureka server

Copy link
Contributor

Choose a reason for hiding this comment

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

I changed the test to pre-register the BANK-ACCOUNT application.

I found the responses from embedded-eureka did not match the classes that were set up for Spry-JSON binding.
I made changes to make the tests pass. Feel free to add back functionality that I removed but ideally, the tests would be kept up to date so that they continue to pass.

@pjfanning
Copy link
Contributor

Unfortunately, embedded-eureka needs java 11.

@Roiocam
Copy link
Member Author

Roiocam commented Sep 26, 2024

Unfortunately, embedded-eureka needs java 11.

what about testcontainers?

@pjfanning pjfanning modified the milestones: 1.1.0, 1.1.1 Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants