Skip to content

Fixed bug with DefaultServiceInstance: getScheme() was not implemented#926

Open
dagerber wants to merge 2 commits intospring-cloud:mainfrom
dagerber:master
Open

Fixed bug with DefaultServiceInstance: getScheme() was not implemented#926
dagerber wants to merge 2 commits intospring-cloud:mainfrom
dagerber:master

Conversation

@dagerber
Copy link
Copy Markdown
Contributor

This fixes the problem, that a https URI could not be overriden in Unit tests with http (avoiding certificate problems on the build server)

Copy link
Copy Markdown
Collaborator

@OlgaMaciaszek OlgaMaciaszek left a comment

Choose a reason for hiding this comment

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

@dagerber Thanks for submitting this. In general, it looks good, however, have added some comments to address. Also, please add your name with the @author tag in the classes you've changed.
Since this issue is also present in the Hoxton release train, please submit this PR against the 2.2.x branch instead (either edit this PR or create a new one).


@Override
public String getScheme() {
return this.isSecure() ? "https" : "http";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please remove unnecessary this. keyword.

}

@Override
public String getScheme() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please reuse this method in getUri(ServiceInstance instance).


@Test
public void testGetANonExistentServiceShouldReturnAnEmptyList() {
then(this.discoveryClient.description()).isEqualTo("Simple Reactive Discovery Client");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please remove the use of unnecessary this. keywords in tests.

@@ -0,0 +1,102 @@
/*
* Copyright 2012-2020 the original author or authors.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

2012-2021

@OlgaMaciaszek
Copy link
Copy Markdown
Collaborator

Fixes gh-823.

@OlgaMaciaszek OlgaMaciaszek linked an issue Mar 16, 2021 that may be closed by this pull request
@OlgaMaciaszek OlgaMaciaszek self-assigned this Mar 16, 2021
This fixes the problem, that a https URI could not be overriden in Unit tests with http (avoiding certificate problems on the build server)
@OlgaMaciaszek
Copy link
Copy Markdown
Collaborator

@dagerber since we are doing a release today, I'm going to cherry-pick your commits, add the changes from the comments and merge it already.

@dagerber
Copy link
Copy Markdown
Contributor Author

dagerber commented Mar 16, 2021 via email

@OlgaMaciaszek
Copy link
Copy Markdown
Collaborator

Ok, @dagerber. Please change it then and submit against 2.2.x.

@dagerber
Copy link
Copy Markdown
Contributor Author

dagerber commented Mar 16, 2021 via email

@spencergibb
Copy link
Copy Markdown
Member

@dagerber you needed to do a force push as now there are unrelated commits here.

@dagerber
Copy link
Copy Markdown
Contributor Author

dagerber commented Mar 16, 2021 via email

@spencergibb
Copy link
Copy Markdown
Member

Indeed, thanks, that's better.

@spencergibb
Copy link
Copy Markdown
Member

cherry picked to 2.2.x and merged forward via 4269bb3

@spencergibb
Copy link
Copy Markdown
Member

reverted. see #823 (comment)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SimpleServcieInstance should override getScheme()

4 participants